@@ -18,6 +18,10 @@ enum RequiredPermissionType {
1818
1919 /// Requires the user to have a specific permission string.
2020 specificPermission,
21+
22+ /// This action is not supported via this generic route.
23+ /// It is typically handled by a dedicated service or route.
24+ unsupported,
2125}
2226
2327/// Configuration for the authorization requirements of a single HTTP method
@@ -196,17 +200,15 @@ final modelRegistry = <String, ModelConfig<dynamic>>{
196200 requiresOwnershipCheck: true , // Must be the owner
197201 ),
198202 postPermission: const ModelActionPermission (
199- type: RequiredPermissionType .none , // User creation handled by auth routes
203+ type: RequiredPermissionType .unsupported , // User creation handled by auth routes
200204 ),
201205 putPermission: const ModelActionPermission (
202206 type: RequiredPermissionType .specificPermission,
203207 permission: Permissions .userUpdateOwned, // User can update their own
204208 requiresOwnershipCheck: true , // Must be the owner
205209 ),
206210 deletePermission: const ModelActionPermission (
207- type: RequiredPermissionType .specificPermission,
208- permission: Permissions .userDeleteOwned, // User can delete their own
209- requiresOwnershipCheck: true , // Must be the owner
211+ type: RequiredPermissionType .unsupported, // User can delete their own
210212 ),
211213 ),
212214 // Configuration for UserAppSettings (user-owned)
@@ -220,7 +222,7 @@ final modelRegistry = <String, ModelConfig<dynamic>>{
220222 requiresOwnershipCheck: true ,
221223 ),
222224 postPermission: const ModelActionPermission (
223- type: RequiredPermissionType .none ,
225+ type: RequiredPermissionType .unsupported ,
224226 // Creation of UserAppSettings is handled by the authentication service
225227 // during user creation, not via a direct POST to /api/v1/data.
226228 ),
@@ -230,7 +232,7 @@ final modelRegistry = <String, ModelConfig<dynamic>>{
230232 requiresOwnershipCheck: true ,
231233 ),
232234 deletePermission: const ModelActionPermission (
233- type: RequiredPermissionType .none ,
235+ type: RequiredPermissionType .unsupported ,
234236 // Deletion of UserAppSettings is handled by the authentication service
235237 // during account deletion, not via a direct DELETE to /api/v1/data.
236238 ),
@@ -246,7 +248,7 @@ final modelRegistry = <String, ModelConfig<dynamic>>{
246248 requiresOwnershipCheck: true ,
247249 ),
248250 postPermission: const ModelActionPermission (
249- type: RequiredPermissionType .none ,
251+ type: RequiredPermissionType .unsupported ,
250252 // Creation of UserContentPreferences is handled by the authentication
251253 // service during user creation, not via a direct POST to /api/v1/data.
252254 ),
@@ -256,7 +258,7 @@ final modelRegistry = <String, ModelConfig<dynamic>>{
256258 requiresOwnershipCheck: true ,
257259 ),
258260 deletePermission: const ModelActionPermission (
259- type: RequiredPermissionType .none ,
261+ type: RequiredPermissionType .unsupported ,
260262 // Deletion of UserContentPreferences is handled by the authentication
261263 // service during account deletion, not via a direct DELETE to /api/v1/data.
262264 ),
0 commit comments