mirror of
https://github.com/bitwarden/browser
synced 2026-01-06 10:33:57 +00:00
[SSO] Set password auto enroll update (#472)
* [SSO/Auto Enroll] Set Password enrolls new user * Fixed typo * Linter updates * Cleanup // Constructor for SetPasswordRequest
This commit is contained in:
@@ -166,6 +166,15 @@ export class UserService implements UserServiceAbstraction {
|
||||
return new Organization(organizations[id]);
|
||||
}
|
||||
|
||||
async getOrganizationByIdentifier(identifier: string): Promise<Organization> {
|
||||
const organizations = await this.getAllOrganizations();
|
||||
if (organizations == null || organizations.length === 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return organizations.find(o => o.identifier === identifier);
|
||||
}
|
||||
|
||||
async getAllOrganizations(): Promise<Organization[]> {
|
||||
const userId = await this.getUserId();
|
||||
const organizations = await this.storageService.get<{ [id: string]: OrganizationData; }>(
|
||||
|
||||
Reference in New Issue
Block a user