export default function getPermissionLevel ( userId , groupData ) { return groupData . ownerIds . includes ( userId ) ? 'OWNER' : groupData . adminIds . includes ( userId ) ? 'ADMIN' : groupData . memberIds . includes ( userId ) ? 'MEMBER' : 'NOT_MEMBER' ; }