fix: field permissions cannot be saved (#605)

resolve #599
This commit is contained in:
chenos 2022-07-07 17:46:19 +08:00 committed by GitHub
parent 15d7f17fb5
commit a0c021202e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View File

@ -45,6 +45,7 @@ export const scopesSchema: ISchema = {
label: 'name',
value: 'id',
},
multiple: false,
association: {
target: 'rolesResourcesScopes',
},

View File

@ -322,6 +322,11 @@ export class PluginACL extends Plugin {
});
}
}
if (actionName === 'update' && resourceName === 'roles.resources') {
ctx.action.mergeParams({
updateAssociationValues: ['actions'],
});
}
await next();
});