Allow all permissions if unset

This commit is contained in:
Alex Gleason
2023-03-02 10:28:31 -06:00
parent a6c5d468f4
commit d3d363e12f

View File

@ -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;