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 -> "CN=PROJ-Fahrerausbildung Admin_rw,OU=Projekte,OU=Sicherheitsgruppen,DC=fra,DC=fraport,DC=de" `Set.member` ldapFuncs -- Fahrerausbildungadmins are lecturers
    -- SJ: not sure this LDAP-specific key belongs here?
  SystemStudent -> False -- "student" `Set.member` ldapFuncs -- no such key identified at FraPort
