File tree Expand file tree Collapse file tree 3 files changed +3
-5
lines changed Expand file tree Collapse file tree 3 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -134,9 +134,6 @@ func NewFuncMap() template.FuncMap {
134134 "DisableWebhooks" : func () bool {
135135 return setting .DisableWebhooks
136136 },
137- "DisableImportLocal" : func () bool {
138- return ! setting .ImportLocalPaths
139- },
140137 "UserThemeName" : userThemeName ,
141138 "NotificationSettings" : func () map [string ]any {
142139 return map [string ]any {
Original file line number Diff line number Diff line change @@ -314,6 +314,7 @@ func editUserCommon(ctx *context.Context) {
314314 ctx .Data ["DisableRegularOrgCreation" ] = setting .Admin .DisableRegularOrgCreation
315315 ctx .Data ["DisableMigrations" ] = setting .Repository .DisableMigrations
316316 ctx .Data ["DisableGitHooks" ] = setting .DisableGitHooks
317+ ctx .Data ["DisableImportLocal" ] = ! setting .ImportLocalPaths
317318 ctx .Data ["AllowedUserVisibilityModes" ] = setting .Service .AllowedUserVisibilityModesSlice .ToVisibleTypeSlice ()
318319 ctx .Data ["DisableGravatar" ] = setting .Config ().Picture .DisableGravatar .Value (ctx )
319320}
Original file line number Diff line number Diff line change 134134 <input name="allow_git_hook" type="checkbox" {{if .User.CanEditGitHook}}checked{{end}} {{if .DisableGitHooks}}disabled{{end}}>
135135 </div>
136136 </div>
137- <div class="inline field {{if or (DisableImportLocal) (.DisableMigrations)}}tw-hidden{{end}}">
137+ <div class="inline field {{if or (. DisableImportLocal) (.DisableMigrations)}}tw-hidden{{end}}">
138138 <div class="ui checkbox">
139139 <label><strong>{{ctx.Locale.Tr "admin.users.allow_import_local"}}</strong></label>
140- <input name="allow_import_local" type="checkbox" {{if .User.CanImportLocal}}checked{{end}} {{if DisableImportLocal}}disabled{{end}}>
140+ <input name="allow_import_local" type="checkbox" {{if .User.CanImportLocal}}checked{{end}} {{if . DisableImportLocal}}disabled{{end}}>
141141 </div>
142142 </div>
143143 {{if not .DisableRegularOrgCreation}}
You can’t perform that action at this time.
0 commit comments