1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-22 11:45:59 +01:00

[EC-861] Add external id to member modal (#4504)

* [EC-861] feat: add `externalId` field to ui

* [EC-861] feat: add `externalId` to services and data classes
This commit is contained in:
Andreas Coroiu 2023-02-06 15:54:59 +01:00 committed by GitHub
parent 55d9ee22ab
commit 68331f061e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 13 additions and 2 deletions

View File

@ -72,6 +72,7 @@ export class UserAdminService {
view.userId = u.userId;
view.type = u.type;
view.status = u.status;
view.externalId = u.externalId;
view.accessAll = u.accessAll;
view.permissions = u.permissions;
view.resetPasswordEnrolled = u.resetPasswordEnrolled;

View File

@ -10,6 +10,7 @@ export class OrganizationUserAdminView {
organizationId: string;
type: OrganizationUserType;
status: OrganizationUserStatusType;
externalId: string;
accessAll: boolean;
permissions: PermissionsApi;
resetPasswordEnrolled: boolean;

View File

@ -26,7 +26,7 @@
<bit-hint>{{ "inviteMultipleEmailDesc" | i18n: "20" }}</bit-hint>
</bit-form-field>
</ng-container>
<fieldset role="radiogroup" aria-labelledby="roleGroupLabel">
<fieldset role="radiogroup" aria-labelledby="roleGroupLabel" class="tw-mb-6">
<legend
id="roleGroupLabel"
class="tw-mb-2 tw-block tw-text-base tw-font-semibold tw-text-main"
@ -105,7 +105,7 @@
</div>
</label>
</div>
<div class="tw-mb-2 tw-flex tw-items-baseline">
<div class="tw-flex tw-items-baseline">
<input
type="radio"
id="userTypeCustom"
@ -134,6 +134,11 @@
</label>
</div>
</fieldset>
<bit-form-field>
<bit-label>{{ "externalId" | i18n }}</bit-label>
<input bitInput type="text" formControlName="externalId" />
<bit-hint>{{ "externalIdDesc" | i18n }}</bit-hint>
</bit-form-field>
<ng-container *ngIf="customUserTypeSelected">
<h3 class="mt-4 d-flex tw-font-semibold">
{{ "permissions" | i18n }}

View File

@ -78,6 +78,7 @@ export class MemberDialogComponent implements OnInit, OnDestroy {
protected formGroup = this.formBuilder.group({
emails: ["", [Validators.required, commaSeparatedEmails]],
type: OrganizationUserType.User,
externalId: this.formBuilder.control({ value: "", disabled: true }),
accessAllCollections: false,
accessSecretsManager: false,
access: [[] as AccessItemValue[]],
@ -227,6 +228,7 @@ export class MemberDialogComponent implements OnInit, OnDestroy {
this.formGroup.removeControl("emails");
this.formGroup.patchValue({
type: userDetails.type,
externalId: userDetails.externalId,
accessAllCollections: userDetails.accessAll,
access: accessSelections,
accessSecretsManager: userDetails.accessSecretsManager,

View File

@ -10,6 +10,7 @@ export class OrganizationUserResponse extends BaseResponse {
userId: string;
type: OrganizationUserType;
status: OrganizationUserStatusType;
externalId: string;
accessAll: boolean;
accessSecretsManager: boolean;
permissions: PermissionsApi;
@ -24,6 +25,7 @@ export class OrganizationUserResponse extends BaseResponse {
this.type = this.getResponseProperty("Type");
this.status = this.getResponseProperty("Status");
this.permissions = new PermissionsApi(this.getResponseProperty("Permissions"));
this.externalId = this.getResponseProperty("ExternalId");
this.accessAll = this.getResponseProperty("AccessAll");
this.accessSecretsManager = this.getResponseProperty("AccessSecretsManager");
this.resetPasswordEnrolled = this.getResponseProperty("ResetPasswordEnrolled");