All files / app/page/user user.component.html

42.35% Statements 36/85
60% Branches 6/10
0% Functions 0/4
67.5% Lines 27/40

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 601x 1x 1x 1x 1x 1x   5x     1x 5x 1x       1x   5x                   1x         1x 1x 1x 1x 1x 1x 1x           5x         1x 1x 5x 5x 1x   1x      
<ng-container *mobxAutorun>
  <div class="tabs">
    <a class="logo" routerLink="/"></a>
    <h5 class="fake-link" routerLink="." i18n>User Permissions</h5>
    <app-settings></app-settings>
  </div>
 
  <form class="form" [formGroup]="profileForm" (ngSubmit)="save()"
        [appLimitWidth]="form?.fill?.nativeElement" [limitSibling]="true">
 
    <app-user-form #form
                   [group]="user"
                   (tagChanges)="setTag($event)"
                   [showClear]="!!store.view.selectedUser"
                   [showPubKey]="!!store.view.selectedUser"
                   [externalErrors]="externalErrors"
                   (clear)="clear()"></app-user-form>
 
    @if (config.scim) {
      <label class="scim-label">SCIM</label>
      <div class="bubble">
        <label>System for Cross-domain Identity Management</label>
        <div class="form">
          <label for="active">Active:</label>
          <div title="Enable logins">
            <input id="active" type="checkbox" formControlName="active">
          </div>
 
          <label for="password" i18n>Password:</label>
          <input id="password" type="password" [formControl]="password">
 
          <label for="role">Role:</label>
          <select id="role" [formControl]="role">
            <option value="ROLE_ADMIN" i18n>admin</option>
            <option value="ROLE_MOD" i18n>mod</option>
            <option value="ROLE_EDITOR" i18n>editor</option>
            <option value="ROLE_USER" i18n>user</option>
            <option value="ROLE_VIEWER" i18n>viewer</option>
            <option value="ROLE_ANONYMOUS" i18n>anon</option>
            <option value="ROLE_BANNED" i18n>banned</option>
          </select>
        </div>
      </div>
    }
 
    @for (e of serverError; track e) {
      <span><!-- Unexpected Error --></span>
      <div class="error">{{ e }}</div>
    }
 
    <span><!-- Buttons --></span>
    <span class="buttons right">
      <button type="submit" [disabled]="submitted && !profileForm.valid" i18n>{{ store.view.selectedUser ? 'Save' : 'Create' }}</button>
      @if (!!store.view.selectedUser) {
        <button type="button" (click)="delete()" i18n>Delete</button>
      }
    </span>
  </form>
</ng-container>