feat: Backend api for filtering users using filter query string (#2553)

* User search query string
This commit is contained in:
Steven Masley
2022-06-24 10:02:23 -05:00
committed by GitHub
parent 981fb2764f
commit d21ab2115d
13 changed files with 344 additions and 85 deletions

View File

@ -30,3 +30,10 @@ func (d ProvisionerDaemon) RBACObject() rbac.Object {
func (f File) RBACObject() rbac.Object {
return rbac.ResourceFile.WithID(f.Hash).WithOwner(f.CreatedBy.String())
}
// RBACObject returns the RBAC object for the site wide user resource.
// If you are trying to get the RBAC object for the UserData, use
// rbac.ResourceUserData
func (u User) RBACObject() rbac.Object {
return rbac.ResourceUser.WithID(u.ID.String())
}