Compare commits

..

3 Commits

Author SHA1 Message Date
b98ce19211 feat: fix bug in GetDefaultApplication() that caused login error for other orgs (#1299)
* fix:fix bug in GetDefaultApplication

* fix:fix bug in GetDefaultApplication
2022-11-16 00:39:05 +08:00
37d1a73c0c feat: encode redirectUri (#1297) 2022-11-15 19:05:59 +08:00
727877cf54 fix: illegal user when new a permission (#1298) 2022-11-15 14:19:20 +08:00
3 changed files with 8 additions and 3 deletions

View File

@ -222,7 +222,12 @@ func GetDefaultApplication(id string) (*Application, error) {
} }
if organization.DefaultApplication != "" { if organization.DefaultApplication != "" {
return getApplication("admin", organization.DefaultApplication), fmt.Errorf("The default application: %s does not exist", organization.DefaultApplication) defaultApplication := getApplication("admin", organization.DefaultApplication)
if defaultApplication == nil {
return nil, fmt.Errorf("The default application: %s does not exist", organization.DefaultApplication)
} else {
return defaultApplication, nil
}
} }
applications := []*Application{} applications := []*Application{}

View File

@ -29,7 +29,7 @@ class PermissionListPage extends BaseListPage {
name: `permission_${randomName}`, name: `permission_${randomName}`,
createdTime: moment().format(), createdTime: moment().format(),
displayName: `New Permission - ${randomName}`, displayName: `New Permission - ${randomName}`,
users: [this.props.account.name], users: [`${this.props.account.owner}/${this.props.account.name}`],
roles: [], roles: [],
domains: [], domains: [],
resourceType: "Application", resourceType: "Application",

View File

@ -54,7 +54,7 @@ export function oAuthParamsToQuery(oAuthParams) {
} }
// code // code
return `?clientId=${oAuthParams.clientId}&responseType=${oAuthParams.responseType}&redirectUri=${oAuthParams.redirectUri}&scope=${oAuthParams.scope}&state=${oAuthParams.state}&nonce=${oAuthParams.nonce}&code_challenge_method=${oAuthParams.challengeMethod}&code_challenge=${oAuthParams.codeChallenge}`; return `?clientId=${oAuthParams.clientId}&responseType=${oAuthParams.responseType}&redirectUri=${encodeURIComponent(oAuthParams.redirectUri)}&scope=${oAuthParams.scope}&state=${oAuthParams.state}&nonce=${oAuthParams.nonce}&code_challenge_method=${oAuthParams.challengeMethod}&code_challenge=${oAuthParams.codeChallenge}`;
} }
export function getApplicationLogin(oAuthParams) { export function getApplicationLogin(oAuthParams) {