mirror of https://github.com/go-gitea/gitea.git
add skip secondary authorization option for public oauth2 clients (#31454)
parent
e9aa39bda4
commit
a8d0c879c3
@ -0,0 +1,14 @@
|
||||
// Copyright 2024 The Gitea Authors. All rights reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
package v1_23 //nolint
|
||||
|
||||
import "xorm.io/xorm"
|
||||
|
||||
// AddSkipSeconderyAuthToOAuth2ApplicationTable: add SkipSecondaryAuthorization column, setting existing rows to false
|
||||
func AddSkipSecondaryAuthColumnToOAuth2ApplicationTable(x *xorm.Engine) error {
|
||||
type oauth2Application struct {
|
||||
SkipSecondaryAuthorization bool `xorm:"NOT NULL DEFAULT FALSE"`
|
||||
}
|
||||
return x.Sync(new(oauth2Application))
|
||||
}
|
||||
@ -0,0 +1,5 @@
|
||||
export function initOAuth2SettingsDisableCheckbox() {
|
||||
for (const e of document.querySelectorAll('.disable-setting')) e.addEventListener('change', ({target}) => {
|
||||
document.querySelector(e.getAttribute('data-target')).classList.toggle('disabled', target.checked);
|
||||
});
|
||||
}
|
||||
Loading…
Reference in New Issue