fix(acl): invalid action permission judgment (#3735)

* fix: x-acl-action is missing in action schema

* fix: useACLRoleContext

* fix: useACLRoleContext

* fix: useACLRoleContext
This commit is contained in:
katherinehhh 2024-03-17 09:26:35 +08:00 committed by GitHub
parent 820352f280
commit 4cf560b177
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -151,7 +151,7 @@ const useAllowedActions = () => {
const useResourceName = () => {
const service = useResourceActionContext();
const result = useBlockRequestContext() || { service };
return result?.props?.resource || result?.service?.defaultRequest?.resource;
return result?.props?.resource || result?.props?.collection || result?.service?.defaultRequest?.resource;
};
export function useACLRoleContext() {