mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
Allow disabling activity/revisions (#5112)
* Add accountability column * Add field info for accountability * Add accountability to collection type * Fetch accountability info from collection meta * Add field name translation for accountability field * Hide revisions drawer detail if revisions aren't available * Only save activity where accountability flag matches * Disable revisions for directus_presets Fixes #3767 * Tweak field option naming
This commit is contained in:
@@ -50,5 +50,11 @@ export function useCollection(collectionKey: string | Ref<string>) {
|
||||
return info.value?.meta?.singleton === true;
|
||||
});
|
||||
|
||||
return { info, fields, defaults, primaryKeyField, userCreatedField, sortField, isSingleton };
|
||||
const accountabilityScope = computed(() => {
|
||||
if (!info.value) return null;
|
||||
if (!info.value.meta) return null;
|
||||
return info.value.meta.accountability;
|
||||
});
|
||||
|
||||
return { info, fields, defaults, primaryKeyField, userCreatedField, sortField, isSingleton, accountabilityScope };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user