fradrive/src/Handler/Utils/LdapSystemFunctions.hs
2020-12-10 19:09:33 +01:00

15 lines
389 B
Haskell

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