Open BlackDex opened 19 hours ago
This PR needs a web-vault built from this PR https://github.com/dani-garcia/bw_web_builds/pull/186 I'm have yet to fix the CSS, since it now still hides some elements which need to be visible.
But it would be nice if some people are able to test this PR using a web-vault built from the PR linked above.
In the future this needs to be changed to full role support though.
May I suggest to add more comments to the code, where your changes from this PR have to be reverted when full role support is implemented. Unless you you'll keep the compat layer even then.
It is quite possible to forget to remove/change current code/behavior when the "future" changes are not close to this PR. Please ignore, if I am way off.
These changes try to add the custom role in such a way that it stays compatible with the older manager role. It will convert a manager role into a custom role, and if a manager has
access-all
rights, it will enable the correct custom roles. Upon saving it will convert these back to the old format.What this does is making sure you are able to revert back to an older version of Vaultwarden without issues. This way we can support newer web-vault's and still be compatible with a previous Vaultwarden version if needed.
In the future this needs to be changed to full role support though.