bitwarden / web

The website vault (vault.bitwarden.com).
https://vault.bitwarden.com
Other
2.58k stars 405 forks source link

[EC-241] Fix Manage SSO permissions #1709

Closed eliykat closed 2 years ago

eliykat commented 2 years ago

Type of change

Objective

The permissions for the Manage SSO page are too wide - any manager can access the vault URL (even though the page itself never loads because it’s blocked at the server side). This page should be limited to those where organization.manageSso is true, i.e. admins, owners, Manage SSO custom permission.

Note: you have to navigate directly to the URL to find this bug, the button is hidden correctly in the UI.

(This will not be picked to rc. Master only)

Code changes

Update permissions in the routing guards. The Permissions array only requires that 1 of those permissions is met for navigation to be permitted. So:

Screenshots

Before you submit