()
| 7 | |
| 8 | /** 获取用户团队权限 */ |
| 9 | export 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 | }; |
no test coverage detected