-
Notifications
You must be signed in to change notification settings - Fork 10.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[NEW] Settings to further customize GitLab OAuth (#15014)
Co-Authored-By: Hajo Möller <dasjoe@gmail.com>
- Loading branch information
1 parent
ac7ac5b
commit 49feadc
Showing
6 changed files
with
55 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -146,4 +146,5 @@ import './v145'; | |
import './v146'; | ||
import './v147'; | ||
import './v148'; | ||
import './v149'; | ||
import './xrun'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { Migrations } from '../../../app/migrations/server'; | ||
import { settings } from '../../../app/settings/server'; | ||
import { Settings } from '../../../app/models/server'; | ||
|
||
Migrations.add({ | ||
version: 149, | ||
up() { | ||
if (settings.get('Accounts_OAuth_Gitlab')) { | ||
const setting = Settings.findById('Accounts_OAuth_Gitlab_identity_path'); | ||
const newValue = '/api/v3/user'; | ||
|
||
if (setting) { | ||
Settings.updateValueById('Accounts_OAuth_Gitlab_identity_path', newValue); | ||
} else { | ||
Settings.createWithIdAndValue('Accounts_OAuth_Gitlab_identity_path', newValue); | ||
} | ||
} | ||
}, | ||
down() { | ||
// Down migration does not apply in this case | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters