Skip to content

Conversation

aslilac
Copy link
Member

@aslilac aslilac commented Feb 26, 2025

currently, we use ActionDelete to determine whether you can unassign a role, which is terrible, because we also use that to determine if you can delete the role itself.

there is more cleanup to do here, like renaming the roles resources to not start with assign_, but this change means that we can remove organization_role.delete from org user admins, which fixes a UI bug. this was a lot of work to fix a single button, but it needed to be done anyway. 😅

Copy link
Member

@Emyrk Emyrk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just 1 nit 👍

func (q *querier) CustomRoles(ctx context.Context, arg database.CustomRolesParams) ([]database.CustomRole, error) {
if err := q.authorizeContext(ctx, policy.ActionRead, rbac.ResourceAssignRole); err != nil {
roleObject := rbac.ResourceAssignOrgRole
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
roleObject := rbac.ResourceAssignOrgRole
roleObject := rbac.ResourceAssignRole

@aslilac aslilac merged commit 91a4a98 into main Feb 27, 2025
35 checks passed
@aslilac aslilac deleted the lilac/action-unassign branch February 27, 2025 17:39
@github-actions github-actions bot locked and limited conversation to collaborators Feb 27, 2025
@stirby
Copy link
Collaborator

stirby commented Mar 4, 2025

/cherry-pick release/2.20

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy