fixbug
This commit is contained in:
@@ -358,8 +358,10 @@ default_keep_email_private=默认情况下隐藏邮箱地址
|
||||
default_keep_email_private_popup=默认情况下,隐藏新用户帐户的邮箱地址。
|
||||
default_allow_create_organization=默认情况下允许创建组织
|
||||
default_allow_create_devcontainer=默认情况下允许创建容器
|
||||
default_allow_create_actrunner=默认情况下允许创建运行器
|
||||
default_allow_create_organization_popup=默认情况下, 允许新用户帐户创建组织。
|
||||
default_allow_create_devcontainer_popup=默认情况下, 允许新用户帐户创建容器。
|
||||
default_allow_create_actrunner_popup=默认情况下, 允许新用户帐户创建运行器。
|
||||
default_enable_timetracking=默认情况下启用时间跟踪
|
||||
default_enable_timetracking_popup=默认情况下启用新仓库的时间跟踪。
|
||||
no_reply_address=隐藏邮件域
|
||||
@@ -3412,6 +3414,7 @@ config.reset_password_code_lives=恢复账户验证码过期时间
|
||||
config.default_keep_email_private=默认隐藏邮箱地址
|
||||
config.default_allow_create_organization=默认情况下允许创建组织
|
||||
config.default_allow_create_devcontainer=默认情况下允许创建 DevContainer
|
||||
config.default_allow_create_actrunner=默认情况下允许创建 ActRunner
|
||||
config.enable_timetracking=启用时间跟踪
|
||||
config.default_enable_timetracking=默认情况下启用时间跟踪
|
||||
config.default_allow_only_contributors_to_track_time=仅允许成员跟踪时间
|
||||
|
||||
@@ -338,6 +338,8 @@ func EditUserPost(ctx *context.Context) {
|
||||
}
|
||||
|
||||
form := web.GetForm(ctx).(*forms.AdminEditUserForm)
|
||||
// TEMP LOG: dump received form values to help debug allow_create_actrunner binding
|
||||
log.Info("AdminEditUserPost: received form values: AllowCreateActRunner=%v, AllowCreateDevcontainer=%v, AllowCreateOrganization=%v, Admin=%v, Active=%v, ProhibitLogin=%v", form.AllowCreateActRunner, form.AllowCreateDevcontainer, form.AllowCreateOrganization, form.Admin, form.Active, form.ProhibitLogin)
|
||||
if ctx.HasError() {
|
||||
ctx.HTML(http.StatusOK, tplUserEdit)
|
||||
return
|
||||
|
||||
@@ -48,9 +48,9 @@ type AdminEditUserForm struct {
|
||||
Restricted bool
|
||||
AllowGitHook bool
|
||||
AllowImportLocal bool
|
||||
AllowCreateOrganization bool
|
||||
AllowCreateDevcontainer bool
|
||||
AllowCreateActRunner bool
|
||||
AllowCreateOrganization bool `form:"allow_create_organization"`
|
||||
AllowCreateDevcontainer bool `form:"allow_create_devcontainer"`
|
||||
AllowCreateActRunner bool `form:"allow_create_actrunner"`
|
||||
ProhibitLogin bool
|
||||
Reset2FA bool `form:"reset_2fa"`
|
||||
Visibility structs.VisibleType
|
||||
|
||||
@@ -174,7 +174,8 @@ func UpdateUser(ctx context.Context, u *user_model.User, opts *UpdateOptions) er
|
||||
if opts.AllowCreateActRunner.Has() {
|
||||
u.AllowCreateActRunner = opts.AllowCreateActRunner.Value()
|
||||
|
||||
cols = append(cols, "allow_create_actrunner")
|
||||
// DB column name uses snake_case with underscore between "act" and "runner"
|
||||
cols = append(cols, "allow_create_act_runner")
|
||||
}
|
||||
if opts.RepoAdminChangeTeamAccess.Has() {
|
||||
u.RepoAdminChangeTeamAccess = opts.RepoAdminChangeTeamAccess.Value()
|
||||
|
||||
@@ -310,6 +310,12 @@
|
||||
<input name="default_allow_create_devcontainer" type="checkbox" {{if .default_allow_create_devcontainer}}checked{{end}}>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inline field">
|
||||
<div class="ui checkbox">
|
||||
<label data-tooltip-content="{{ctx.Locale.Tr "install.default_allow_create_actrunner_popup"}}">{{ctx.Locale.Tr "install.default_allow_create_actrunner"}}</label>
|
||||
<input name="default_allow_create_actrunner" type="checkbox" {{if .default_allow_create_actrunner}}checked{{end}}>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inline field">
|
||||
<div class="ui checkbox">
|
||||
<label data-tooltip-content="{{ctx.Locale.Tr "install.default_enable_timetracking_popup"}}">{{ctx.Locale.Tr "install.default_enable_timetracking"}}</label>
|
||||
|
||||
Reference in New Issue
Block a user