We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
POC
package acl type Condition struct { parent *Condition } func NewCondition() *Condition { return &Condition{} } func (condition *Condition) Require(rights... string) *Condition { return condition } func (condition *Condition) Disallow(rights... string) *Condition { return condition } func (condition *Condition) And(connection *Condition) *Condition { return condition } func (condition *Condition) Or(connection *Condition) *Condition { return connection } func (condition *Condition) IsAllowed(rights ...string) *Condition { return condition } func (condition *Condition) End() *Condition { return condition.parent }
Usage
func main() { condition := NewCondition().IsAllowed("right.a").Or(NewCondition().IsAllowed("right.b")) if manager.IsAllowedByCondition(condition) { // ... } }
The text was updated successfully, but these errors were encountered:
awsome!
Sorry, something went wrong.
No branches or pull requests
POC
Usage
The text was updated successfully, but these errors were encountered: