1
0
mirror of https://github.com/bitwarden/jslib synced 2025-12-14 23:33:36 +00:00

Move policy checks within policyService (#466)

* Move policy logic within policyService

* Remove unneeded import

* Clean up unused code

* Fix linting

* Enforce policies from accepting org invite

* Only exempt owner or admin from policies

* Use canManagePolicies as exemption criteria

* Make orgUser status check more semantic

Co-authored-by: Addison Beck <abeck@bitwarden.com>

Co-authored-by: Addison Beck <abeck@bitwarden.com>
This commit is contained in:
Thomas Rittson
2021-08-31 06:52:57 +10:00
committed by GitHub
parent f02720a1c6
commit 30419a625f
6 changed files with 49 additions and 44 deletions

View File

@@ -135,4 +135,8 @@ export class Organization {
get canManageUsersPassword() {
return this.isAdmin || this.permissions.manageResetPassword;
}
get isExemptFromPolicies() {
return this.canManagePolicies;
}
}