Safe Haskell | Trustworthy |
---|
This module exports a class Groups
that policy modules
must define an instance of to define groups, or mappings
between a group Principal
and the principals in the group.
An app may then relabel a labeled value by using labelRewrite
.
- class PolicyModule pm => Groups pm where
- labelRewrite :: forall unused_pm a. Groups unused_pm => unused_pm -> DCLabeled a -> DBAction (DCLabeled a)
Documentation
class PolicyModule pm => Groups pm whereSource
:: pm | Unused type-enforcing param |
-> DCPriv | Policy module privs |
-> Principal | Group |
-> DBAction [Principal] | (Policy module, group members)
| Endorse the implementation of this instance. Note that this is
reduced to WHNF to catch invalid instances that use Example implementation: groupsInstanceEndorse _ = MyPolicyModuleTCB {- Leave other values undefined -} |
Typically, the action should expand a principal such as #group
to
list of group members [alice, bob]
.