Skip to content

Commit

Permalink
Add RBAC type abstraction for ACL checks
Browse files Browse the repository at this point in the history
  • Loading branch information
demdxx committed Aug 7, 2024
1 parent 481bb23 commit bb65633
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions pkg/acl/rbac_type.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package acl

// RBACType represents RBAC type abstraction which can replace some non-standard ACL types & checks
type RBACType struct {
AccountID uint64
UserID uint64
ResourceName string
}

// RBACResourceName returns the name of the resource for the RBAC
func (tp *RBACType) RBACResourceName() string {
return tp.ResourceName
}

0 comments on commit bb65633

Please sign in to comment.