MCPcopy
hub / github.com/Tencent/CodeAnalysis / useOrgAdminPerm

Function useOrgAdminPerm

web/packages/tca-layout/src/utils/hooks.ts:9–14  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7
8/** 获取用户团队权限 */
9export const useOrgAdminPerm = () => {
10 const { userinfo } = useStateStore<UserState>(NAMESPACE);
11 const isAdmin: boolean = useSelector((state: any) => state.APP)?.isOrgAdminUser ?? false;
12 const isSuperuser: boolean = userinfo?.is_superuser;
13 return [isSuperuser || isAdmin, isAdmin, isSuperuser];
14};

Callers 2

ToolsFunction · 0.90
ToolLibsFunction · 0.90

Calls 1

useStateStoreFunction · 0.90

Tested by

no test coverage detected