mirror of
https://github.com/directus/directus.git
synced 2026-02-01 12:45:02 -05:00
Fix update permission check
This commit is contained in:
@@ -29,9 +29,10 @@ export function isAllowed(
|
||||
if (attemptedFields.every((field) => allowedFields.includes(field)) === false) return false;
|
||||
}
|
||||
|
||||
const schema = generateJoi(['create', 'update'] ? permissionInfo.validation : permissionInfo.permissions, {
|
||||
const schema = generateJoi(permissionInfo.permissions, {
|
||||
allowUnknown: true,
|
||||
});
|
||||
|
||||
const { error } = schema.validate(value);
|
||||
|
||||
if (!error) {
|
||||
|
||||
Reference in New Issue
Block a user