import { getConfig } from '@/config/configuration' ; const { ADMIN_GROUPS , ADMIN_USERS } = getConfig ( ) ; const ADMIN_GROUP_SET = new Set ( ADMIN_GROUPS ) ; const ADMIN_USER_SET = new Set ( ADMIN_USERS ) ; param email param userGroups returns export function isAdministrator ( email , userGroups ) { let isAdminGroupMember = false ; const userGroupSet = new Set ( userGroups ) ; for ( const adminGroup of ADMIN_GROUP_SET ) { if ( userGroupSet . has ( adminGroup ) ) { isAdminGroupMember = true ; break ; } } return isAdminGroupMember || ADMIN_USER_SET . has ( email ) ; }