File

auth-configuration/sso-configuration/template-parts/access-mapping/access-mapping.component.ts

Metadata

Index

Properties
Methods
Inputs
Accessors

Constructor

constructor(controlContainer: ControlContainer)
Parameters :
Name Type Optional
controlContainer ControlContainer No

Inputs

apps
Type : IApplication[]
groups
Type : IUserGroup[]
templateModel
Type : any

Methods

addAccessMapping
addAccessMapping()
Returns : void
ngOnChanges
ngOnChanges()
Returns : void
onRemove
onRemove(accessMapping)
Parameters :
Name Optional
accessMapping No
Returns : void
setDynamicMappingConfiguration
setDynamicMappingConfiguration(mapRolesOnlyForNewUser: boolean, manageRolesOnlyFromAccessMapping: boolean)
Parameters :
Name Type Optional Default value
mapRolesOnlyForNewUser boolean No
manageRolesOnlyFromAccessMapping boolean No false
Returns : void

Properties

CLEAR_AND_UPDATED_ROLES_ON_EACH_LOG_IN_OPTION
Default value : gettext( 'Roles selected in the rules above will be reassigned to a user on each log in and other ones will be cleared' )
CLEAR_AND_UPDATED_ROLES_ON_EACH_LOG_IN_TOOLTIP
Default value : gettext( 'The access mapping will be executing during the first login. The administrator cannot edit the SSO user roles. During each following login all roles are cleared and the mapping is executed again.' )
UPDATE_ROLES_LISTED_IN_ACCESS_MAPPING_ON_EACH_LOG_IN_OPTION
Default value : gettext( 'Roles selected in the rules above will be reassigned to a user on each log in and other ones will be unchanged' )
UPDATE_ROLES_LISTED_IN_ACCESS_MAPPING_ON_EACH_LOG_IN_TOOLTIP
Default value : gettext( 'The access mapping will be executed only once during the first login, then the administrator can edit the user roles. During the next login only the roles listed in the access mappings will be updated.' )
USE_ACCESS_MAPPING_ON_USER_CREATION_OPTION
Default value : gettext( 'Use dynamic access mapping only on user creation' )
USE_ACCESS_MAPPING_ON_USER_CREATION_TOOLTIP
Default value : gettext( 'The access mapping will be executed only once during the first login, then the administrator can edit the user roles. During the next login, these mappings will not be executed.' )

Accessors

mapRolesOnlyForNewUser
getmapRolesOnlyForNewUser()
manageRolesOnlyFromAccessMapping
getmanageRolesOnlyFromAccessMapping()
<div class="col-md-12 p-t-16">
  <div class="row m-l-8 m-r-8">
    <div class="col-xs-12 col-sm-3 col-md-2">
      <div class="h4 text-normal text-right text-left-xs" translate>Access mapping</div>
    </div>

    <div class="col-xs-12 col-sm-9 col-md-10 col-lg-9">
      <div class="dynamic-access">
        <div class="legend form-block m-t-4" translate>Dynamic access mapping</div>
        <c8y-form-group>
          <c8y-ui-empty-state
            *ngIf="templateModel.onNewUser.dynamicMapping.mappings.length === 0"
            [icon]="'list'"
            [title]="'No access mapping rules defined.' | translate"
            [subtitle]="'Click below to add a new mapping.' | translate"
            [horizontal]="true"
          ></c8y-ui-empty-state>
          <div
            *ngFor="
              let accessMapping of templateModel.onNewUser.dynamicMapping.mappings;
              index as idx
            "
          >
            <c8y-sso-dynamic-access-mapping
              [accessMapping]="accessMapping"
              (onRemoveAccessMapping)="onRemove(accessMapping)"
              [apps]="apps"
              [groups]="groups"
              [accessMappingIndex]="idx"
            ></c8y-sso-dynamic-access-mapping>
          </div>
          <div class="scroll-column-footer">
            <button
              title="{{ 'Add access mapping' | translate }}"
              class="btn btn-default m-b-16"
              (click)="addAccessMapping()"
              type="button"
            >
              <i c8yIcon="plus-circle" class="m-r-4"></i>
              {{ 'Add access mapping' | translate }}
            </button>
          </div>
        </c8y-form-group>
      </div>
      <c8y-form-group>
        <label
          title="{{ USE_ACCESS_MAPPING_ON_USER_CREATION_OPTION | translate }}"
          class="c8y-radio input-sm"
        >
          <input
            type="radio"
            name="dynamicAccessMappingConfiguration"
            [checked]="mapRolesOnlyForNewUser"
            (change)="setDynamicMappingConfiguration(true)"
          />
          <span></span>
          <span>{{ USE_ACCESS_MAPPING_ON_USER_CREATION_OPTION | translate }}</span>
          <button
            class="btn-help"
            popover="{{ USE_ACCESS_MAPPING_ON_USER_CREATION_TOOLTIP | translate }}"
            placement="right"
            [outsideClick]="true"
            container="body"
            [attr.aria-label]="'Help' | translate"
          >
            <i c8yIcon="question-circle-o"></i>
          </button>
        </label>
        <label
          title="{{ UPDATE_ROLES_LISTED_IN_ACCESS_MAPPING_ON_EACH_LOG_IN_OPTION | translate }}"
          class="c8y-radio input-sm"
        >
          <input
            type="radio"
            name="dynamicAccessMappingConfiguration"
            [checked]="!mapRolesOnlyForNewUser && manageRolesOnlyFromAccessMapping"
            (change)="setDynamicMappingConfiguration(false, true)"
          />
          <span></span>
          <span>
            {{ UPDATE_ROLES_LISTED_IN_ACCESS_MAPPING_ON_EACH_LOG_IN_OPTION | translate }}
          </span>
          <button
            class="btn-help"
            popover="{{ UPDATE_ROLES_LISTED_IN_ACCESS_MAPPING_ON_EACH_LOG_IN_TOOLTIP | translate }}"
            placement="right"
            [outsideClick]="true"
            container="body"
            [attr.aria-label]="'Help' | translate"
          >
            <i c8yIcon="question-circle-o"></i>
          </button>
        </label>
        <label
          title="{{ CLEAR_AND_UPDATED_ROLES_ON_EACH_LOG_IN_OPTION | translate }}"
          class="c8y-radio input-sm"
        >
          <input
            type="radio"
            name="dynamicAccessMappingConfiguration"
            [checked]="!mapRolesOnlyForNewUser && !manageRolesOnlyFromAccessMapping"
            (change)="setDynamicMappingConfiguration(false, false)"
          />
          <span></span>
          <span>
            {{ CLEAR_AND_UPDATED_ROLES_ON_EACH_LOG_IN_OPTION | translate }}
          </span>
          <button
            class="btn-help"
            popover="{{ CLEAR_AND_UPDATED_ROLES_ON_EACH_LOG_IN_TOOLTIP | translate }}"
            placement="right"
            triggers="focus"
            [attr.aria-label]="'Help' | translate"
            container="body"
          >
            <i c8yIcon="question-circle-o"></i>
          </button>
        </label>
      </c8y-form-group>
    </div>
  </div>
</div>

results matching ""

    No results matching ""