mirror of
https://github.com/directus/directus.git
synced 2026-02-11 02:55:10 -05:00
check if perms have edits (#7599)
This commit is contained in:
@@ -111,7 +111,12 @@ export default defineComponent({
|
||||
|
||||
const permissionLevel = computed<'all' | 'none' | 'custom'>(() => {
|
||||
if (permission.value === undefined) return 'none';
|
||||
if (permission.value.fields?.includes('*')) return 'all';
|
||||
if (
|
||||
permission.value.fields?.includes('*') &&
|
||||
Object.keys(permission.value.permissions || {}).length === 0 &&
|
||||
Object.keys(permission.value.validation || {}).length === 0
|
||||
)
|
||||
return 'all';
|
||||
|
||||
return 'custom';
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user