File tree Expand file tree Collapse file tree 7 files changed +22
-3
lines changed
system-chat-user/authentication/component
system-setting/authentication/component Expand file tree Collapse file tree 7 files changed +22
-3
lines changed Original file line number Diff line number Diff line change 4545
4646 <div class =" text-right" >
4747 <el-button @click =" submit(authFormRef)" type =" primary" :disabled =" loading"
48- v-hasPermission ="
48+ v-hasPermission ="
4949 new ComplexPermission(
5050 [RoleConst.ADMIN],
5151 [PermissionConst.CHAT_USER_AUTH_EDIT],
@@ -64,8 +64,8 @@ import authApi from '@/api/chat-user/auth-setting'
6464import type {FormInstance , FormRules } from ' element-plus'
6565import {t } from ' @/locales'
6666import {MsgSuccess } from ' @/utils/message'
67- import { PermissionConst , RoleConst } from ' @/utils/permission/data'
68- import { ComplexPermission } from ' @/utils/permission/type'
67+ import {PermissionConst , RoleConst } from ' @/utils/permission/data'
68+ import {ComplexPermission } from ' @/utils/permission/type'
6969
7070const form = ref <any >({
7171 id: ' ' ,
@@ -125,6 +125,9 @@ function getDetail() {
125125 }
126126 form .value = res .data
127127 }
128+ if (! form .value .config .redirectUrl ) {
129+ form .value .config .redirectUrl = window .location .origin + window .MaxKB .chatPrefix + ' /api/auth/cas'
130+ }
128131 })
129132}
130133
Original file line number Diff line number Diff line change @@ -208,6 +208,9 @@ function getDetail() {
208208 if (res .data && JSON .stringify (res .data ) !== ' {}' ) {
209209 form .value = res .data
210210 }
211+ if (! form .value .config .redirectUrl ) {
212+ form .value .config .redirectUrl = window .location .origin + window .MaxKB .chatPrefix + ' /api/auth/oauth2'
213+ }
211214 })
212215}
213216
Original file line number Diff line number Diff line change @@ -219,6 +219,9 @@ function getDetail() {
219219 form .value .config .fieldMapping = ' {"username": "preferred_username", "email": "email"}'
220220 }
221221 }
222+ if (! form .value .config .redirectUrl ) {
223+ form .value .config .redirectUrl = window .location .origin + window .MaxKB .chatPrefix + ' /api/auth/oidc'
224+ }
222225 })
223226}
224227
Original file line number Diff line number Diff line change @@ -124,6 +124,9 @@ function getDetail() {
124124 res .data .config .validateUrl = res .data .config .ldpUri
125125 }
126126 form .value = res .data
127+ if (! form .value .config .redirectUrl ){
128+ form .value .config .redirectUrl = window .location .origin + window .MaxKB .prefix + ' api/cas'
129+ }
127130 }
128131 })
129132}
Original file line number Diff line number Diff line change @@ -208,6 +208,9 @@ function getDetail() {
208208 if (res .data && JSON .stringify (res .data ) !== ' {}' ) {
209209 form .value = res .data
210210 }
211+ if (! form .value .config .redirectUrl ){
212+ form .value .config .redirectUrl = window .location .origin + window .MaxKB .prefix + ' api/oauth2'
213+ }
211214 })
212215}
213216
Original file line number Diff line number Diff line change @@ -218,6 +218,9 @@ function getDetail() {
218218 ) {
219219 form .value .config .fieldMapping = ' {"username": "preferred_username", "email": "email"}'
220220 }
221+ if (! form .value .config .redirectUrl ){
222+ form .value .config .redirectUrl = window .location .origin + window .MaxKB .prefix + ' api/oidc'
223+ }
221224 }
222225 })
223226}
Original file line number Diff line number Diff line change 2424 value =" is_active"
2525 />
2626 <el-option
27+ v-if =" user.isEE() || user.isPE()"
2728 :label =" $t('views.userManage.source.label')"
2829 value =" source"
2930 />
You can’t perform that action at this time.
0 commit comments