mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
feat: implement logged in organization joining + improvements
This commit is contained in:
parent
25ac82f4ad
commit
693a28721d
19 changed files with 200 additions and 29 deletions
|
|
@ -20,10 +20,12 @@ function useAdminStatus() {
|
|||
const isAdminVar = userRoles.some((role: Role) => {
|
||||
return (
|
||||
role.org.id === org.id &&
|
||||
(role.role.id === 1 ||
|
||||
(
|
||||
role.role.id === 1 ||
|
||||
role.role.id === 2 ||
|
||||
role.role.role_uuid === 'role_global_admin' ||
|
||||
role.role.role_uuid === 'role_global_maintainer')
|
||||
role.role.role_uuid === 'role_global_maintainer'
|
||||
)
|
||||
);
|
||||
});
|
||||
setIsAdmin(isAdminVar);
|
||||
|
|
@ -38,3 +40,4 @@ function useAdminStatus() {
|
|||
}
|
||||
|
||||
export default useAdminStatus;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue