@@ -188,7 +188,9 @@ final modelRegistry = <String, ModelConfig<dynamic>>{
188
188
'country' : ModelConfig <Country >(
189
189
fromJson: Country .fromJson,
190
190
getId: (c) => c.id,
191
- // Countries: Admin-owned, read allowed by standard/guest users
191
+ // Countries: Static data, read-only for all authenticated users.
192
+ // Modification is not allowed via the API as this is real-world data
193
+ // managed by database seeding.
192
194
getCollectionPermission: const ModelActionPermission (
193
195
type: RequiredPermissionType .specificPermission,
194
196
permission: Permissions .countryRead,
@@ -197,14 +199,32 @@ final modelRegistry = <String, ModelConfig<dynamic>>{
197
199
type: RequiredPermissionType .specificPermission,
198
200
permission: Permissions .countryRead,
199
201
),
202
+ postPermission: const ModelActionPermission (type: RequiredPermissionType .unsupported),
203
+ putPermission: const ModelActionPermission (type: RequiredPermissionType .unsupported),
204
+ deletePermission: const ModelActionPermission (type: RequiredPermissionType .unsupported),
205
+ ),
206
+ 'language' : ModelConfig <Language >(
207
+ fromJson: Language .fromJson,
208
+ getId: (l) => l.id,
209
+ // Languages: Static data, read-only for all authenticated users.
210
+ // Modification is not allowed via the API as this is real-world data
211
+ // managed by database seeding.
212
+ getCollectionPermission: const ModelActionPermission (
213
+ type: RequiredPermissionType .specificPermission,
214
+ permission: Permissions .languageRead,
215
+ ),
216
+ getItemPermission: const ModelActionPermission (
217
+ type: RequiredPermissionType .specificPermission,
218
+ permission: Permissions .languageRead,
219
+ ),
200
220
postPermission: const ModelActionPermission (
201
- type: RequiredPermissionType .adminOnly ,
221
+ type: RequiredPermissionType .unsupported ,
202
222
),
203
223
putPermission: const ModelActionPermission (
204
- type: RequiredPermissionType .adminOnly ,
224
+ type: RequiredPermissionType .unsupported ,
205
225
),
206
226
deletePermission: const ModelActionPermission (
207
- type: RequiredPermissionType .adminOnly ,
227
+ type: RequiredPermissionType .unsupported ,
208
228
),
209
229
),
210
230
'user' : ModelConfig <User >(
0 commit comments