(ctx context.Context, arg database.DeleteCustomRoleParams)
| 2035 | } |
| 2036 | |
| 2037 | func (q *querier) DeleteCustomRole(ctx context.Context, arg database.DeleteCustomRoleParams) error { |
| 2038 | if !arg.OrganizationID.Valid || arg.OrganizationID.UUID == uuid.Nil { |
| 2039 | return NotAuthorizedError{Err: xerrors.New("custom roles must belong to an organization")} |
| 2040 | } |
| 2041 | if err := q.authorizeContext(ctx, policy.ActionDelete, rbac.ResourceAssignOrgRole.InOrg(arg.OrganizationID.UUID)); err != nil { |
| 2042 | return err |
| 2043 | } |
| 2044 | |
| 2045 | return q.db.DeleteCustomRole(ctx, arg) |
| 2046 | } |
| 2047 | |
| 2048 | func (q *querier) DeleteExpiredAPIKeys(ctx context.Context, arg database.DeleteExpiredAPIKeysParams) (int64, error) { |
| 2049 | // Requires DELETE across all API keys. |
nothing calls this directly
no test coverage detected