{-# options_haddock prune #-}

-- | Description: Privilege data type
module Polysemy.Account.Data.Privilege where

-- | The stock privilege type, used only for admin endpoint authorization in @polysemy-account-api@.
data Privilege =
  Web
  |
  Api
  |
  Admin
  deriving stock (Privilege -> Privilege -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Privilege -> Privilege -> Bool
$c/= :: Privilege -> Privilege -> Bool
== :: Privilege -> Privilege -> Bool
$c== :: Privilege -> Privilege -> Bool
Eq, Int -> Privilege -> ShowS
[Privilege] -> ShowS
Privilege -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Privilege] -> ShowS
$cshowList :: [Privilege] -> ShowS
show :: Privilege -> String
$cshow :: Privilege -> String
showsPrec :: Int -> Privilege -> ShowS
$cshowsPrec :: Int -> Privilege -> ShowS
Show, forall x. Rep Privilege x -> Privilege
forall x. Privilege -> Rep Privilege x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Privilege x -> Privilege
$cfrom :: forall x. Privilege -> Rep Privilege x
Generic)

json ''Privilege

instance {-# overlapping #-} Default [Privilege] where
  def :: [Privilege]
def = [Privilege
Web]