Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: include dormant users in template acl query#14461

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

Merged
code-asher merged 1 commit intomainfromasher/template-acl-query-fix
Aug 29, 2024

Conversation

code-asher
Copy link
Member

@code-ashercode-asher commentedAug 27, 2024
edited
Loading

The issue is that if you add a user and then immediately go to give them
permissions, you can add them but they will not show up in the UI. They
also do not show up in the audit log entry.

@code-ashercode-asher changed the titlefix: include suspended and dormant users in acl queryfix: include suspended and dormant users in template acl queryAug 27, 2024
@code-ashercode-asherforce-pushed theasher/template-acl-query-fix branch 2 times, most recently from4035f9a to0c9e3ffCompareAugust 27, 2024 22:57
@code-ashercode-asher changed the titlefix: include suspended and dormant users in template acl queryfix: include dormant users in template acl queryAug 27, 2024
The issue is that if you add a user and then immediately go to give thempermissions, you can add them but they will not show up in the UI.  Theyalso do not show up in the audit log entry.
@code-ashercode-asherforce-pushed theasher/template-acl-query-fix branch from0c9e3ff todf46098CompareAugust 27, 2024 23:00
Role: codersdk.TemplateRoleUse,
})
})

// Test that we do not return suspended users.
t.Run("FilterSuspendedUsers", func(t *testing.T) {
Copy link
MemberAuthor

@code-ashercode-asherAug 27, 2024
edited
Loading

Choose a reason for hiding this comment

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

Should we should include suspended users as well? Since the UI is kind of lying about the permissions if a suspended user is there, whether they were added after being suspended or became suspended after the fact. It looks like we explicitly wanted to filter out suspended users so I wanted to hold off to validate if that makes sense first.

Reasoning being:

  1. You can add a suspended user, but then it will just not show up which is confusing (and it does not record in the audit log).
  2. It could cause someone to think a user has no permissions, then if they unsuspend the user "suddenly" they have permissions again.
  3. Someone might know a suspended user had permissions, but when they go to check they cannot see the user and cannot remove the permissions.

But, I am not completely sure about the workflow/use case around suspension so these concerns might be invalid.

Alternatively we could prevent adding suspended users in the first place, and remove all their permissions when they become suspended. More work, but depending on what suspension is meant to be maybe it makes more sense to do it that way.

Copy link
Member

Choose a reason for hiding this comment

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

The UX story around who to show is unclear.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Opened#14486 so we can figure this out at some point

@code-ashercode-asher marked this pull request as ready for reviewAugust 27, 2024 23:23
@code-asher
Copy link
MemberAuthor

code-asher commentedAug 29, 2024
edited
Loading

@Emyrk sorry to keep requesting you on everything haha, I think Jon is out for a bit and I know you have some context on rbac and permissions and such so thought you might have the right insight <3

@Emyrk
Copy link
Member

Makes sense if you add a user, they are dormant, but should be available for perms 👍

code-asher reacted with heart emoji

@code-ashercode-asher merged commitef7fcf3 intomainAug 29, 2024
48 checks passed
@code-ashercode-asher deleted the asher/template-acl-query-fix branchAugust 29, 2024 21:48
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsAug 29, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@EmyrkEmyrkEmyrk approved these changes

@sreyasreyaAwaiting requested review from sreya

Assignees

@code-ashercode-asher

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@code-asher@Emyrk

[8]ページ先頭

©2009-2025 Movatter.jp