3
0
corteza/server/pkg/rbac/effective.go
2022-11-14 09:26:39 +01:00

20 lines
333 B
Go

package rbac
type (
effective struct {
Resource string `json:"resource"`
Operation string `json:"operation"`
Allow bool `json:"allow"`
}
EffectiveSet []effective
)
func (ee *EffectiveSet) Push(res, op string, allow bool) {
*ee = append(*ee, effective{
Resource: res,
Operation: op,
Allow: allow,
})
}