1 import { CALENDAR_PERMISSIONS } from '@proton/shared/lib/calendar/constants';
2 import { hasBit } from '@proton/shared/lib/helpers/bitset';
4 const { SUPER_OWNER, OWNER, ADMIN, READ_MEMBER_LIST, WRITE, READ, AVAILABILITY } = CALENDAR_PERMISSIONS;
6 export const MEMBER_PERMISSIONS = {
7 OWNS: SUPER_OWNER + OWNER + ADMIN + READ_MEMBER_LIST + WRITE + READ + AVAILABILITY,
8 EDIT: WRITE + READ + AVAILABILITY,
9 FULL_VIEW: READ + AVAILABILITY,
10 LIMITED: AVAILABILITY,
13 export const getCanWrite = (permissions: CALENDAR_PERMISSIONS) => {
14 return hasBit(permissions, WRITE);