kopia lustrzana https://gitlab.com/soapbox-pub/soapbox
Allow all permissions if unset
rodzic
a6c5d468f4
commit
d3d363e12f
|
@ -10,7 +10,7 @@ type Permission = typeof PERMISSION_CREATE_GROUPS | typeof PERMISSION_INVITE_USE
|
|||
export const hasPermission = (state: RootState, permission: Permission) => {
|
||||
const account = state.accounts_meta.get(state.me as string)!;
|
||||
|
||||
if (!account?.role) return false;
|
||||
if (!account?.role) return true;
|
||||
|
||||
const permissions = account.getIn(['role', 'permissions']) as number;
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue