Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Groups ¶
type Groups []string
Groups is a string list, preferably a string set.
func (Groups) Test ¶
Test verifies that the user's groups satisfy the membership rules.
Use AllOf and/or OneOf to describe how to authorise the user's groups.
Usage:
// user must be able to read both payments and inventory. Groups([]string{...}).Test(AllOf("can_read_payment", "can_read_inventory")) // user must be able to read both payments and inventory, but write permissions implies read as well. Groups([]string{...}).Test(OneOf("can_read_payment", "can_write_payment"), OneOf("can_read_inventory", "can_write_inventory"))
Click to show internal directories.
Click to hide internal directories.