Skip to content

Commit 90c0180

Browse files
authored
Ensure that the default visibility is set on the user create page (#16845)
Set the default visibility on the user create page. Fix #16840 Signed-off-by: Andrew Thornton <art27@cantab.net>
1 parent cad7059 commit 90c0180

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

templates/admin/user/new.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<div class="inline field {{if .Err_Visibility}}error{{end}}">
2929
<span class="inline required field"><label for="visibility">{{.i18n.Tr "settings.visibility"}}</label></span>
3030
<div class="ui selection type dropdown">
31-
<input type="hidden" id="visibility" name="visibility" value="{{.visibility}}">
31+
<input type="hidden" id="visibility" name="visibility" value="{{if .visibility}}{{.visibility}}{{else}}{{printf "%d" .DefaultUserVisibilityMode}}{{end}}">
3232
<div class="text">
3333
{{if .DefaultUserVisibilityMode.IsPublic}}{{.i18n.Tr "settings.visibility.public"}}{{end}}
3434
{{if .DefaultUserVisibilityMode.IsLimited}}{{.i18n.Tr "settings.visibility.limited"}}{{end}}

0 commit comments

Comments
 (0)