Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data PermType
- permTypeToCode :: PermType -> Text
- data PermColSpec b
- data PermDef (b :: BackendType) (perm :: BackendType -> Type) = PermDef {
- _pdRole :: RoleName
- _pdPermission :: PermDefPermission b perm
- _pdComment :: Maybe Text
- data PermDefPermission (b :: BackendType) (perm :: BackendType -> Type) where
- SelPerm' :: SelPerm b -> PermDefPermission b SelPerm
- InsPerm' :: InsPerm b -> PermDefPermission b InsPerm
- UpdPerm' :: UpdPerm b -> PermDefPermission b UpdPerm
- DelPerm' :: DelPerm b -> PermDefPermission b DelPerm
- unPermDefPermission :: PermDefPermission b perm -> perm b
- reflectPermDefPermission :: PermDefPermission b a -> PermType
- data QueryRootFieldType
- data SubscriptionRootFieldType
- data InsPerm (b :: BackendType) = InsPerm {
- ipCheck :: BoolExp b
- ipSet :: Maybe (ColumnValues b Value)
- ipColumns :: Maybe (PermColSpec b)
- ipBackendOnly :: Bool
- type InsPermDef b = PermDef b InsPerm
- data AllowedRootFields rootFieldType
- = ARFAllowAllRootFields
- | ARFAllowConfiguredRootFields (HashSet rootFieldType)
- isRootFieldAllowed :: Eq rootField => rootField -> AllowedRootFields rootField -> Bool
- data SelPerm (b :: BackendType) = SelPerm {}
- type SelPermDef b = PermDef b SelPerm
- data DelPerm (b :: BackendType) = DelPerm {
- dcFilter :: BoolExp b
- dcBackendOnly :: Bool
- type DelPermDef b = PermDef b DelPerm
- data UpdPerm (b :: BackendType) = UpdPerm {
- ucColumns :: PermColSpec b
- ucSet :: Maybe (ColumnValues b Value)
- ucFilter :: BoolExp b
- ucCheck :: Maybe (BoolExp b)
- ucBackendOnly :: Bool
- type UpdPermDef b = PermDef b UpdPerm
- pdRole :: forall b perm. Lens' (PermDef b perm) RoleName
- pdPermission :: forall b perm b perm. Lens (PermDef b perm) (PermDef b perm) (PermDefPermission b perm) (PermDefPermission b perm)
- pdComment :: forall b perm. Lens' (PermDef b perm) (Maybe Text)
Documentation
Instances
permTypeToCode :: PermType -> Text Source #
data PermColSpec b Source #
Instances
data PermDef (b :: BackendType) (perm :: BackendType -> Type) Source #
PermDef | |
|
Instances
data PermDefPermission (b :: BackendType) (perm :: BackendType -> Type) where Source #
The permission data as it appears in a PermDef
.
Since this type is a GADT it facilitates that values which are polymorphic
may re-discover its specific type of permission by case analysis.
The fact that permission types are tracked in types are more accidental than intentional and something we want to move away from, see https://github.com/hasura/graphql-engine-mono/issues/4076.
SelPerm' :: SelPerm b -> PermDefPermission b SelPerm | |
InsPerm' :: InsPerm b -> PermDefPermission b InsPerm | |
UpdPerm' :: UpdPerm b -> PermDefPermission b UpdPerm | |
DelPerm' :: DelPerm b -> PermDefPermission b DelPerm |
Instances
unPermDefPermission :: PermDefPermission b perm -> perm b Source #
reflectPermDefPermission :: PermDefPermission b a -> PermType Source #
data QueryRootFieldType Source #
Instances
data SubscriptionRootFieldType Source #
Instances
data InsPerm (b :: BackendType) Source #
InsPerm | |
|
Instances
type InsPermDef b = PermDef b InsPerm Source #
data AllowedRootFields rootFieldType Source #
ARFAllowAllRootFields | |
ARFAllowConfiguredRootFields (HashSet rootFieldType) |
Instances
isRootFieldAllowed :: Eq rootField => rootField -> AllowedRootFields rootField -> Bool Source #
data SelPerm (b :: BackendType) Source #
SelPerm | |
|
Instances
type SelPermDef b = PermDef b SelPerm Source #
data DelPerm (b :: BackendType) Source #
DelPerm | |
|
Instances
type DelPermDef b = PermDef b DelPerm Source #
data UpdPerm (b :: BackendType) Source #
UpdPerm | |
|
Instances
type UpdPermDef b = PermDef b UpdPerm Source #
pdPermission :: forall b perm b perm. Lens (PermDef b perm) (PermDef b perm) (PermDefPermission b perm) (PermDefPermission b perm) Source #