@@ -132,16 +132,16 @@ func (p *provisionerDaemonAuth) authorize(r *http.Request, orgID uuid.UUID, tags
132
132
return uuid .Nil ,nil ,xerrors .New ("user unauthorized" )
133
133
}
134
134
135
- // Allow fallback to PSK auth if the user is not allowed to create provisioner daemons.
136
- // This is to preserve backwards compatibility with existing user provisioner daemons.
137
- // If using PSK auth, the daemon is, by definition, scoped to the organization.
138
- tags = provisionersdk .MutateTags (uuid .Nil ,tags )
139
-
140
135
pskKey ,err := uuid .Parse (codersdk .ProvisionerKeyIDPSK )
141
136
if err != nil {
142
137
return uuid .Nil ,nil ,xerrors .Errorf ("parse psk provisioner key id: %w" ,err )
143
138
}
144
139
140
+ // Allow fallback to PSK auth if the user is not allowed to create provisioner daemons.
141
+ // This is to preserve backwards compatibility with existing user provisioner daemons.
142
+ // If using PSK auth, the daemon is, by definition, scoped to the organization.
143
+ tags = provisionersdk .MutateTags (uuid .Nil ,tags )
144
+
145
145
return pskKey ,tags ,nil
146
146
}
147
147