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>
</select>
</div>
<a href="{{currentConfig?.auth_mode?.value==='oidc_auth'?'https://openid.net/connect/':'javascript:void(0)'}}"
target="{{currentConfig?.auth_mode?.value==='oidc_auth'?'_blank':''}}" role="tooltip"
<a href="{{currentConfig?.auth_mode?.value==='oidc_auth'?'https://openid.net/connect/':'/'}}"
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">
<clr-icon shape="info-circle" size="24" class="info-tips-icon"></clr-icon>
<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');
}
}
public allowGoOidc(event) {
return this.currentConfig.auth_mode && this.currentConfig.auth_mode.value === 'oidc_auth';
}
}