@@ -141,17 +141,17 @@ final modelRegistry = <String, ModelConfig<dynamic>>{
141
141
type: RequiredPermissionType .adminOnly,
142
142
),
143
143
),
144
- 'category ' : ModelConfig <Category >(
145
- fromJson: Category .fromJson,
146
- getId: (c ) => c .id,
147
- // Categories : Admin-owned, read allowed by standard/guest users
144
+ 'topic ' : ModelConfig <Topic >(
145
+ fromJson: Topic .fromJson,
146
+ getId: (t ) => t .id,
147
+ // Topics : Admin-owned, read allowed by standard/guest users
148
148
getCollectionPermission: const ModelActionPermission (
149
149
type: RequiredPermissionType .specificPermission,
150
- permission: Permissions .categoryRead ,
150
+ permission: Permissions .topicRead ,
151
151
),
152
152
getItemPermission: const ModelActionPermission (
153
153
type: RequiredPermissionType .specificPermission,
154
- permission: Permissions .categoryRead ,
154
+ permission: Permissions .topicRead ,
155
155
),
156
156
postPermission: const ModelActionPermission (
157
157
type: RequiredPermissionType .adminOnly,
@@ -231,7 +231,7 @@ final modelRegistry = <String, ModelConfig<dynamic>>{
231
231
),
232
232
deletePermission: const ModelActionPermission (
233
233
type: RequiredPermissionType .specificPermission,
234
- permission: Permissions .userReadOwned , // User can delete their own
234
+ permission: Permissions .userDeleteOwned , // User can delete their own
235
235
requiresOwnershipCheck: true , // Must be the owner
236
236
),
237
237
),
@@ -245,7 +245,7 @@ final modelRegistry = <String, ModelConfig<dynamic>>{
245
245
),
246
246
getItemPermission: const ModelActionPermission (
247
247
type: RequiredPermissionType .specificPermission,
248
- permission: Permissions .appSettingsReadOwned ,
248
+ permission: Permissions .userAppSettingsReadOwned ,
249
249
requiresOwnershipCheck: true ,
250
250
),
251
251
postPermission: const ModelActionPermission (
@@ -255,7 +255,7 @@ final modelRegistry = <String, ModelConfig<dynamic>>{
255
255
),
256
256
putPermission: const ModelActionPermission (
257
257
type: RequiredPermissionType .specificPermission,
258
- permission: Permissions .appSettingsUpdateOwned ,
258
+ permission: Permissions .userAppSettingsUpdateOwned ,
259
259
requiresOwnershipCheck: true ,
260
260
),
261
261
deletePermission: const ModelActionPermission (
@@ -275,7 +275,7 @@ final modelRegistry = <String, ModelConfig<dynamic>>{
275
275
),
276
276
getItemPermission: const ModelActionPermission (
277
277
type: RequiredPermissionType .specificPermission,
278
- permission: Permissions .userPreferencesReadOwned ,
278
+ permission: Permissions .userContentPreferencesReadOwned ,
279
279
requiresOwnershipCheck: true ,
280
280
),
281
281
postPermission: const ModelActionPermission (
@@ -285,7 +285,7 @@ final modelRegistry = <String, ModelConfig<dynamic>>{
285
285
),
286
286
putPermission: const ModelActionPermission (
287
287
type: RequiredPermissionType .specificPermission,
288
- permission: Permissions .userPreferencesUpdateOwned ,
288
+ permission: Permissions .userContentPreferencesUpdateOwned ,
289
289
requiresOwnershipCheck: true ,
290
290
),
291
291
deletePermission: const ModelActionPermission (
@@ -294,16 +294,16 @@ final modelRegistry = <String, ModelConfig<dynamic>>{
294
294
// service during account deletion, not via a direct DELETE to /api/v1/data.
295
295
),
296
296
),
297
- 'app_config ' : ModelConfig <AppConfig >(
298
- fromJson: AppConfig .fromJson,
297
+ 'remote_config ' : ModelConfig <RemoteConfig >(
298
+ fromJson: RemoteConfig .fromJson,
299
299
getId: (config) => config.id,
300
- getOwnerId: null , // AppConfig is a global resource, not user-owned
300
+ getOwnerId: null , // RemoteConfig is a global resource, not user-owned
301
301
getCollectionPermission: const ModelActionPermission (
302
302
type: RequiredPermissionType .unsupported, // Not accessible via collection
303
303
),
304
304
getItemPermission: const ModelActionPermission (
305
- type: RequiredPermissionType
306
- .none, // Readable by any authenticated user via /api/v1/data/[id]
305
+ type: RequiredPermissionType .specificPermission,
306
+ permission : Permissions .remoteConfigRead,
307
307
),
308
308
postPermission: const ModelActionPermission (
309
309
type: RequiredPermissionType .adminOnly, // Only administrators can create
0 commit comments