Skip to content

Conversation

@eliykat
Copy link
Member

@eliykat eliykat commented Jun 6, 2022

Type of change (mark with an X)

- [x] Bug fix
- [ ] New feature development
- [ ] Tech debt (refactoring, code cleanup, dependency upgrades, etc)
- [ ] Build/deploy pipeline (DevOps)
- [ ] Other

Objective

Fix an issue where admins cannot see collections that they create.

This is the same issue as #1959, I just didn't cast the net wide enough. Instead of just checking for Owners (and implicitly Providers), we should also check for Admins - as they also have access to all items.

Code changes

  • change _currentContext.organizationOwner to _currentContext.organizationAdmin (which implicitly includes owners and providers as well)
  • make comment more succinct

Before you submit (mark with an X)

- [x] I have checked for formatting errors (`dotnet tool run dotnet-format --check`) (required)
- [ ] If making database changes - I have also updated Entity Framework queries and/or migrations
- [ ] I have added **unit tests** where it makes sense to do so (encouraged but not required)
- [ ] This change requires a **documentation update** (notify the documentation team)
- [ ] This change has particular **deployment requirements** (notify the DevOps team)

@eliykat eliykat requested a review from a team June 6, 2022 06:12
Copy link
Contributor

@gbubemismith gbubemismith left a comment

Choose a reason for hiding this comment

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

This looks good

@eliykat eliykat requested a review from a team June 6, 2022 20:41
@eliykat
Copy link
Member Author

eliykat commented Jun 6, 2022

@gbubemismith Github isn't letting me merge this - do you have write access to the Bitwarden repos? I've requested another review from the team.

differsthecat
differsthecat previously approved these changes Jun 6, 2022
@eliykat
Copy link
Member Author

eliykat commented Jun 7, 2022

Sorry @differsthecat , the comment was misaligned and it was going to bug me for all time if I didn't fix it now

@eliykat eliykat requested a review from differsthecat June 7, 2022 00:13
@differsthecat
Copy link
Member

differsthecat commented Jun 7, 2022

Sorry @differsthecat , the comment was misaligned and it was going to bug me for all time if I didn't fix it now

No worries!

@eliykat eliykat merged commit f602df2 into master Jun 7, 2022
@eliykat eliykat deleted the fix/admin-permissions branch June 7, 2022 00:33
eliykat added a commit that referenced this pull request Jun 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants