mirror of
https://github.com/nocobase/nocobase
synced 2024-11-16 04:25:10 +00:00
refactor: acl support namespace
This commit is contained in:
parent
3535a8d559
commit
ccee2df920
@ -95,7 +95,7 @@ export const useACLRolesCheck = () => {
|
||||
const ctx = useContext(ACLContext);
|
||||
const ns = useCollectionNamespace();
|
||||
const { dataSources: dataSourcesAcl } = ctx.data.meta;
|
||||
const data = { ...ctx?.data?.data, ...omit(dataSourcesAcl[ns], 'snippets') };
|
||||
const data = { ...ctx?.data?.data, ...omit(dataSourcesAcl?.[ns], 'snippets') };
|
||||
const getActionAlias = (actionPath: string) => {
|
||||
const actionName = actionPath.split(':').pop();
|
||||
return data?.actionAlias?.[actionName] || actionName;
|
||||
|
Loading…
Reference in New Issue
Block a user