module Handler.Utils.LdapSystemFunctions
  ( determineSystemFunctions
  ) where

import Import.NoFoundation

import qualified Data.Set as Set


determineSystemFunctions :: Set (CI Text) -> (SystemFunction -> Bool)
determineSystemFunctions ldapFuncs = \case
  SystemExamOffice -> False
  SystemFaculty -> "faculty" `Set.member` ldapFuncs
  SystemStudent -> "student" `Set.member` ldapFuncs
