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