Merge pull request #7653 from jwangyangls/fix_auth_mode_click_error

Modify auth mode icon to jump to a new page only in OIDC mode
This commit is contained in:
jwangyangls 2019-05-07 10:42:48 +08:00 committed by GitHub
commit 42e3a506d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -12,8 +12,8 @@
<option value="oidc_auth">{{'CONFIG.AUTH_MODE_OIDC' | translate }}</option> <option value="oidc_auth">{{'CONFIG.AUTH_MODE_OIDC' | translate }}</option>
</select> </select>
</div> </div>
<a href="{{currentConfig?.auth_mode?.value==='oidc_auth'?'https://openid.net/connect/':'javascript:void(0)'}}" <a href="{{currentConfig?.auth_mode?.value==='oidc_auth'?'https://openid.net/connect/':'/'}}"
target="{{currentConfig?.auth_mode?.value==='oidc_auth'?'_blank':''}}" role="tooltip" target="{{currentConfig?.auth_mode?.value==='oidc_auth'?'_blank':''}}" role="tooltip" (click)="allowGoOidc($event)"
aria-haspopup="true" class="tooltip tooltip-lg tooltip-top-right top-1"> aria-haspopup="true" class="tooltip tooltip-lg tooltip-top-right top-1">
<clr-icon shape="info-circle" size="24" class="info-tips-icon"></clr-icon> <clr-icon shape="info-circle" size="24" class="info-tips-icon"></clr-icon>
<span class="tooltip-content">{{'CONFIG.TOOLTIP.AUTH_MODE' | translate}}</span> <span class="tooltip-content">{{'CONFIG.TOOLTIP.AUTH_MODE' | translate}}</span>

View File

@ -251,5 +251,8 @@ export class ConfigurationAuthComponent implements OnChanges, OnInit {
console.error('Nothing changed'); console.error('Nothing changed');
} }
} }
public allowGoOidc(event) {
return this.currentConfig.auth_mode && this.currentConfig.auth_mode.value === 'oidc_auth';
}
} }