Skip to content

Commit d61ad30

Browse files
authored
Merge branch 'main' into fix-restore
2 parents 7cbcb62 + 361d807 commit d61ad30

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

cmd/admin.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,11 @@ var (
308308
Value: "false",
309309
Usage: "Use custom URLs for GitLab/GitHub OAuth endpoints",
310310
},
311+
cli.StringFlag{
312+
Name: "custom-tenant-id",
313+
Value: "",
314+
Usage: "Use custom Tenant ID for OAuth endpoints",
315+
},
311316
cli.StringFlag{
312317
Name: "custom-auth-url",
313318
Value: "",
@@ -829,6 +834,7 @@ func parseOAuth2Config(c *cli.Context) *oauth2.Source {
829834
AuthURL: c.String("custom-auth-url"),
830835
ProfileURL: c.String("custom-profile-url"),
831836
EmailURL: c.String("custom-email-url"),
837+
Tenant: c.String("custom-tenant-id"),
832838
}
833839
} else {
834840
customURLMapping = nil
@@ -938,6 +944,7 @@ func runUpdateOauth(c *cli.Context) error {
938944
customURLMapping.AuthURL = oAuth2Config.CustomURLMapping.AuthURL
939945
customURLMapping.ProfileURL = oAuth2Config.CustomURLMapping.ProfileURL
940946
customURLMapping.EmailURL = oAuth2Config.CustomURLMapping.EmailURL
947+
customURLMapping.Tenant = oAuth2Config.CustomURLMapping.Tenant
941948
}
942949
if c.IsSet("use-custom-urls") && c.IsSet("custom-token-url") {
943950
customURLMapping.TokenURL = c.String("custom-token-url")
@@ -955,6 +962,10 @@ func runUpdateOauth(c *cli.Context) error {
955962
customURLMapping.EmailURL = c.String("custom-email-url")
956963
}
957964

965+
if c.IsSet("use-custom-urls") && c.IsSet("custom-tenant-id") {
966+
customURLMapping.Tenant = c.String("custom-tenant-id")
967+
}
968+
958969
oAuth2Config.CustomURLMapping = customURLMapping
959970
source.Cfg = oAuth2Config
960971

docs/content/doc/upgrade/from-gogs.en-us.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,10 @@ Then repeat the procedure, but this time using the [latest release](https://dl.g
8585

8686
## Upgrading from a more recent version of Gogs
8787

88-
Upgrading from a more recent version of Gogs is also possible, but requires a bit more work.
89-
See [#4286](https://github.com/go-gitea/gitea/issues/4286).
88+
Upgrading from a more recent version of Gogs (up to `0.11.x`) may also be possible, but will require a bit more work.
89+
See [#4286](https://github.com/go-gitea/gitea/issues/4286), which includes various Gogs `0.11.x` versions.
90+
91+
Upgrading from Gogs `0.12.x` and above will be increasingly more difficult as the projects diverge further apart in configuration and schema.
9092

9193
## Troubleshooting
9294

docs/content/doc/usage/command-line.en-us.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ Admin operations:
124124
- `--secret`: Client Secret.
125125
- `--auto-discover-url`: OpenID Connect Auto Discovery URL (only required when using OpenID Connect as provider).
126126
- `--use-custom-urls`: Use custom URLs for GitLab/GitHub OAuth endpoints.
127+
- `--custom-tenant-id`: Use custom Tenant ID for OAuth endpoints.
127128
- `--custom-auth-url`: Use a custom Authorization URL (option for GitLab/GitHub).
128129
- `--custom-token-url`: Use a custom Token URL (option for GitLab/GitHub).
129130
- `--custom-profile-url`: Use a custom Profile URL (option for GitLab/GitHub).
@@ -147,6 +148,7 @@ Admin operations:
147148
- `--secret`: Client Secret.
148149
- `--auto-discover-url`: OpenID Connect Auto Discovery URL (only required when using OpenID Connect as provider).
149150
- `--use-custom-urls`: Use custom URLs for GitLab/GitHub OAuth endpoints.
151+
- `--custom-tenant-id`: Use custom Tenant ID for OAuth endpoints.
150152
- `--custom-auth-url`: Use a custom Authorization URL (option for GitLab/GitHub).
151153
- `--custom-token-url`: Use a custom Token URL (option for GitLab/GitHub).
152154
- `--custom-profile-url`: Use a custom Profile URL (option for GitLab/GitHub).

0 commit comments

Comments
 (0)