diff --git a/src/composables/use-permissions.ts b/src/composables/use-permissions.ts index eff65a6..4afd8fe 100644 --- a/src/composables/use-permissions.ts +++ b/src/composables/use-permissions.ts @@ -57,10 +57,10 @@ export function usePermissions(collection: Ref, item: Ref, isNew: R if (userStore.currentUser?.role?.admin_access === true) return fields; - const permissions = permissionsStore.getPermissionsForUser(collection.value, isNew.value ? 'create' : 'update'); + const permissions = permissionsStore.getPermission(collection.value, isNew.value ? 'create' : 'update'); // remove fields without read permissions so they don't show up in the DOM - const readableFields = permissionsStore.getPermissionsForUser(collection.value, 'read')?.fields; + const readableFields = permissionsStore.getPermission(collection.value, 'read')?.fields; if (readableFields && readableFields.includes('*') === false) { fields = fields.filter((field) => readableFields.includes(field.field)); }