-- SPDX-FileCopyrightText: 2023-2024 Sarah Vaupel <sarah.vaupel@uniworx.de>, Gregor Kleen <gregor.kleen@ifi.lmu.de>, David Mosbach <david.mosbach@uniworx.de>
--
-- SPDX-License-Identifier: AGPL-3.0-or-later

module Foundation.Types
  ( UpsertUserMode(..)
  , _UpsertUserLoginLdap, _UpsertUserLoginAzure, _UpsertUserLoginDummy, _UpsertUserLoginOther, _UpsertUserSync, _UpsertUserGuessUser
  , _upsertUserIdent
  ) where

import Import.NoFoundation


data UpsertUserMode
  = UpsertUserLoginLdap
  | UpsertUserLoginAzure
  | UpsertUserLoginDummy { upsertUserIdent :: UserIdent }
  | UpsertUserLoginOther { upsertUserIdent :: UserIdent } -- does not allow further login
  | UpsertUserSync       { upsertUserIdent :: UserIdent }
  | UpsertUserGuessUser
  deriving (Eq, Ord, Read, Show, Generic)

makeLenses_ ''UpsertUserMode
makePrisms ''UpsertUserMode
