- Notifications
You must be signed in to change notification settings - Fork928
chore: implement deleting custom roles#14101
New issue
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes from1 commit
6a140af
cff829b
19ca988
9063675
6b0ac00
817bb4b
5033ee8
3b9790a
e8f57fe
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
- Loading branch information
Uh oh!
There was an error while loading.Please reload this page.
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1247,6 +1247,19 @@ func (s *MethodTestSuite) TestUser() { | ||
s.Run("CustomRoles", s.Subtest(func(db database.Store, check *expects) { | ||
check.Args(database.CustomRolesParams{}).Asserts(rbac.ResourceAssignRole, policy.ActionRead).Returns([]database.CustomRole{}) | ||
})) | ||
s.Run("DeleteCustomRole", s.Subtest(func(db database.Store, check *expects) { | ||
customRole := dbgen.CustomRole(s.T(), db, database.CustomRole{ | ||
OrganizationID: uuid.NullUUID{ | ||
UUID: uuid.New(), | ||
Valid: true, | ||
}, | ||
}) | ||
check.Args(database.DeleteCustomRoleParams{ | ||
Name: customRole.Name, | ||
OrganizationID: customRole.OrganizationID, | ||
}).Asserts( | ||
rbac.ResourceAssignOrgRole.InOrg(customRole.OrganizationID.UUID), policy.ActionDelete) | ||
})) | ||
Emyrk marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
s.Run("Blank/UpsertCustomRole", s.Subtest(func(db database.Store, check *expects) { | ||
// Blank is no perms in the role | ||
check.Args(database.UpsertCustomRoleParams{ | ||
Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.
Uh oh!
There was an error while loading.Please reload this page.