mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-25 12:15:18 +01:00
[SM-605] Remove access from create service account (#4946)
This commit is contained in:
parent
f2276227aa
commit
4f64ac87de
@ -1,42 +1,11 @@
|
|||||||
<form [formGroup]="formGroup" [bitSubmit]="submit">
|
<form [formGroup]="formGroup" [bitSubmit]="submit">
|
||||||
<bit-dialog dialogSize="default">
|
<bit-dialog dialogSize="small">
|
||||||
<ng-container bitDialogTitle>{{ "newServiceAccount" | i18n }}</ng-container>
|
<ng-container bitDialogTitle>{{ "newServiceAccount" | i18n }}</ng-container>
|
||||||
<div bitDialogContent>
|
<div bitDialogContent>
|
||||||
<bit-form-field>
|
<bit-form-field>
|
||||||
<bit-label>{{ "serviceAccountName" | i18n }}</bit-label>
|
<bit-label>{{ "serviceAccountName" | i18n }}</bit-label>
|
||||||
<input formControlName="name" bitInput />
|
<input formControlName="name" bitInput />
|
||||||
</bit-form-field>
|
</bit-form-field>
|
||||||
<h3 class="tw-uppercase">{{ "smAccess" | i18n }}</h3>
|
|
||||||
|
|
||||||
<bit-form-field>
|
|
||||||
<bit-label>{{ "newSaSelectAccess" | i18n }}</bit-label>
|
|
||||||
<select bitInput>
|
|
||||||
<!-- TODO need to look into creating a bit autocomplete component? -->
|
|
||||||
<option selected disabled hidden>-- {{ "newSaTypeToFilter" | i18n }} --</option>
|
|
||||||
<option *ngFor="let project of projects">
|
|
||||||
{{ project.name }}
|
|
||||||
</option>
|
|
||||||
<option *ngFor="let secret of secrets">
|
|
||||||
{{ secret.name }}
|
|
||||||
</option>
|
|
||||||
</select>
|
|
||||||
</bit-form-field>
|
|
||||||
|
|
||||||
<bit-table>
|
|
||||||
<ng-container header>
|
|
||||||
<tr>
|
|
||||||
<th bitCell>{{ "projectCommaSecret" | i18n }}</th>
|
|
||||||
<th bitCell>{{ "permissions" | i18n }}</th>
|
|
||||||
</tr>
|
|
||||||
</ng-container>
|
|
||||||
<ng-template body>
|
|
||||||
<tr>
|
|
||||||
<!-- TODO once access is implement display selected access -->
|
|
||||||
<td bitCell>example</td>
|
|
||||||
<td bitCell>example</td>
|
|
||||||
</tr>
|
|
||||||
</ng-template>
|
|
||||||
</bit-table>
|
|
||||||
</div>
|
</div>
|
||||||
<div bitDialogFooter class="tw-flex tw-gap-2">
|
<div bitDialogFooter class="tw-flex tw-gap-2">
|
||||||
<button type="submit" bitButton buttonType="primary" bitFormButton>
|
<button type="submit" bitButton buttonType="primary" bitFormButton>
|
||||||
|
@ -1,15 +1,11 @@
|
|||||||
import { DialogRef, DIALOG_DATA } from "@angular/cdk/dialog";
|
import { DialogRef, DIALOG_DATA } from "@angular/cdk/dialog";
|
||||||
import { Component, Inject, OnInit } from "@angular/core";
|
import { Component, Inject } from "@angular/core";
|
||||||
import { FormControl, FormGroup, Validators } from "@angular/forms";
|
import { FormControl, FormGroup, Validators } from "@angular/forms";
|
||||||
|
|
||||||
import { I18nService } from "@bitwarden/common/abstractions/i18n.service";
|
import { I18nService } from "@bitwarden/common/abstractions/i18n.service";
|
||||||
import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service";
|
import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service";
|
||||||
|
|
||||||
import { ProjectListView } from "../../models/view/project-list.view";
|
|
||||||
import { SecretListView } from "../../models/view/secret-list.view";
|
|
||||||
import { ServiceAccountView } from "../../models/view/service-account.view";
|
import { ServiceAccountView } from "../../models/view/service-account.view";
|
||||||
import { ProjectService } from "../../projects/project.service";
|
|
||||||
import { SecretService } from "../../secrets/secret.service";
|
|
||||||
import { ServiceAccountService } from "../service-account.service";
|
import { ServiceAccountService } from "../service-account.service";
|
||||||
|
|
||||||
export interface ServiceAccountOperation {
|
export interface ServiceAccountOperation {
|
||||||
@ -20,11 +16,8 @@ export interface ServiceAccountOperation {
|
|||||||
selector: "sm-service-account-dialog",
|
selector: "sm-service-account-dialog",
|
||||||
templateUrl: "./service-account-dialog.component.html",
|
templateUrl: "./service-account-dialog.component.html",
|
||||||
})
|
})
|
||||||
export class ServiceAccountDialogComponent implements OnInit {
|
export class ServiceAccountDialogComponent {
|
||||||
projects: ProjectListView[];
|
protected formGroup = new FormGroup({
|
||||||
secrets: SecretListView[];
|
|
||||||
|
|
||||||
formGroup = new FormGroup({
|
|
||||||
name: new FormControl("", [Validators.required]),
|
name: new FormControl("", [Validators.required]),
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -33,16 +26,9 @@ export class ServiceAccountDialogComponent implements OnInit {
|
|||||||
@Inject(DIALOG_DATA) private data: ServiceAccountOperation,
|
@Inject(DIALOG_DATA) private data: ServiceAccountOperation,
|
||||||
private serviceAccountService: ServiceAccountService,
|
private serviceAccountService: ServiceAccountService,
|
||||||
private i18nService: I18nService,
|
private i18nService: I18nService,
|
||||||
private platformUtilsService: PlatformUtilsService,
|
private platformUtilsService: PlatformUtilsService
|
||||||
private projectService: ProjectService,
|
|
||||||
private secretService: SecretService
|
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
async ngOnInit() {
|
|
||||||
this.projects = await this.projectService.getProjects(this.data.organizationId);
|
|
||||||
this.secrets = await this.secretService.getSecrets(this.data.organizationId);
|
|
||||||
}
|
|
||||||
|
|
||||||
submit = async () => {
|
submit = async () => {
|
||||||
this.formGroup.markAllAsTouched();
|
this.formGroup.markAllAsTouched();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user