mirror of https://github.com/portainer/portainer
fix automatic team membership toggle issue (#6382)
parent
fa798665cd
commit
125d84cbd1
|
@ -1,7 +1,5 @@
|
|||
<ng-form name="oauthSettingsForm">
|
||||
<div class="col-sm-12 form-section-title">
|
||||
Single Sign-On
|
||||
</div>
|
||||
<div class="col-sm-12 form-section-title"> Single Sign-On </div>
|
||||
|
||||
<!-- SSO -->
|
||||
<div class="form-group">
|
||||
|
@ -50,14 +48,14 @@
|
|||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 col-lg-2 control-label text-left">Default team</label>
|
||||
<span class="small text-muted" style="margin-left: 20px;" ng-if="$ctrl.teams.length === 0">
|
||||
<span class="small text-muted" style="margin-left: 20px" ng-if="$ctrl.teams.length === 0">
|
||||
You have not yet created any teams. Head over to the <a ui-sref="portainer.teams">Teams view</a> to manage teams.
|
||||
</span>
|
||||
|
||||
<div class="col-sm-9" ng-if="$ctrl.teams.length > 0">
|
||||
<div class="col-sm-12 small text-muted">
|
||||
<p>
|
||||
<i class="fa fa-info-circle blue-icon" aria-hidden="true" style="margin-right: 2px;"></i>
|
||||
<i class="fa fa-info-circle blue-icon" aria-hidden="true" style="margin-right: 2px"></i>
|
||||
The default team option will be disabled when automatic team membership is enabled
|
||||
</p>
|
||||
</div>
|
||||
|
@ -84,20 +82,16 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12 form-section-title">
|
||||
Team membership
|
||||
</div>
|
||||
<div class="col-sm-12 form-section-title"> Team membership </div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-12 text-muted small">
|
||||
Automatic team membership synchronizes the team membership based on a custom claim in the token from the OAuth provider.
|
||||
</div>
|
||||
<div class="col-sm-12 text-muted small"> Automatic team membership synchronizes the team membership based on a custom claim in the token from the OAuth provider. </div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-12">
|
||||
<por-switch-field
|
||||
label="'Automatic team membership'"
|
||||
name="'tls'"
|
||||
feature="$ctrl.limitedFeature"
|
||||
feature-id="$ctrl.limitedFeature"
|
||||
checked="$ctrl.settings.OAuthAutoMapTeamMemberships"
|
||||
on-change="($ctrl.onToggleAutoTeamMembership)"
|
||||
></por-switch-field>
|
||||
|
@ -118,20 +112,18 @@
|
|||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 col-lg-2 control-label text-left">
|
||||
Statically assigned teams
|
||||
</label>
|
||||
<label class="col-sm-3 col-lg-2 control-label text-left"> Statically assigned teams </label>
|
||||
<div class="col-sm-9 col-lg-10">
|
||||
<span class="label label-default interactive" style="margin-left: 1.4em;" ng-click="$ctrl.addTeamMembershipMapping()">
|
||||
<span class="label label-default interactive" style="margin-left: 1.4em" ng-click="$ctrl.addTeamMembershipMapping()">
|
||||
<i class="fa fa-plus-circle" aria-hidden="true"></i> add team mapping
|
||||
</span>
|
||||
|
||||
<div class="col-sm-12 form-inline" ng-repeat="mapping in $ctrl.settings.TeamMemberships.OAuthClaimMappings" style="margin-top: 0.75em;">
|
||||
<div class="col-sm-12 form-inline" ng-repeat="mapping in $ctrl.settings.TeamMemberships.OAuthClaimMappings" style="margin-top: 0.75em">
|
||||
<div class="input-group input-group-sm col-sm-5">
|
||||
<span class="input-group-addon">claim value regex</span>
|
||||
<input type="text" class="form-control" ng-model="mapping.ClaimValRegex" />
|
||||
</div>
|
||||
<span style="margin: 0px 0.5em;">maps to</span>
|
||||
<span style="margin: 0px 0.5em">maps to</span>
|
||||
<div class="input-group input-group-sm col-sm-3 col-lg-4">
|
||||
<span class="input-group-addon">team</span>
|
||||
<select
|
||||
|
@ -145,7 +137,7 @@
|
|||
</div>
|
||||
<button type="button" class="btn btn-sm btn-danger" ng-click="$ctrl.removeTeamMembership($index)"> <i class="fa fa-trash" aria-hidden="true"> </i></button>
|
||||
|
||||
<div class="small text-warning" ng-show="!mapping.ClaimValRegex" style="margin-top: 0.4em;">
|
||||
<div class="small text-warning" ng-show="!mapping.ClaimValRegex" style="margin-top: 0.4em">
|
||||
<i class="fa fa-exclamation-triangle" aria-hidden="true"></i> Claim value regex is required.
|
||||
</div>
|
||||
</div>
|
||||
|
@ -153,11 +145,9 @@
|
|||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-12 text-muted small" style="margin-bottom: 0.5em;">
|
||||
The default team will be assigned when the user does not belong to any other team
|
||||
</div>
|
||||
<div class="col-sm-12 text-muted small" style="margin-bottom: 0.5em"> The default team will be assigned when the user does not belong to any other team </div>
|
||||
<label class="col-sm-3 col-lg-2 control-label text-left">Default team</label>
|
||||
<span class="small text-muted" style="margin-left: 20px;" ng-if="$ctrl.teams.length === 0">
|
||||
<span class="small text-muted" style="margin-left: 20px" ng-if="$ctrl.teams.length === 0">
|
||||
You have not yet created any teams. Head over to the <a ui-sref="portainer.teams">Teams view</a> to manage teams.
|
||||
</span>
|
||||
|
||||
|
|
Loading…
Reference in New Issue