1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-22 12:54:53 -05:00

ui(admin): improve names of user settings and add descriptions

Changes
* checkbox titles are no longer strong.
* added descriptions to all options. Mostly from memory, but there are a few sources:
   - https://docs.gitea.com/help/faq#active-user-vs-login-prohibited-user
   - https://docs.gitea.com/help/faq#restricted-users
* for git hooks, I just moved tooltip into description.
* renamed titles. The only important one is: "Disable sign-in" -> "Suspended account" as it has a change of terminology. We don't seem to have anything about this option in our docs though. This is what the option really does. In fact, it does not invalidate current sessions of the user, but shows them the same "Sign-in prohibited" screen for all actions.

Preview: https://codeberg.org/attachments/e5649045-dfe8-4327-869f-cb2530ca6b17
(the text of the last one is slightly outdated after review)

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4499
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
This commit is contained in:
0ko 2024-07-15 03:57:56 +00:00
parent 717495a980
commit af4b32aece
2 changed files with 25 additions and 12 deletions

View file

@ -3019,14 +3019,20 @@ users.update_profile_success = The user account has been updated.
users.edit_account = Edit user account
users.max_repo_creation = Maximum number of repositories
users.max_repo_creation_desc = (Enter -1 to use the global default limit.)
users.is_activated = User Account Is Activated
users.prohibit_login = Disable sign-in
users.is_admin = Is administrator
users.is_restricted = Is restricted
users.is_activated = Activated account
users.activated.description = Completion of email verification. The owner of an unactivated account will not be able to log in until email verification is completed.
users.prohibit_login = Suspended account
users.block.description = Block this user from interacting with this service through their account and prohibit signing in.
users.is_admin = Administrator account
users.admin.description = Grant this user full access to all administrative features available through the web UI and the API.
users.is_restricted = Restricted account
users.restricted.description = Only allow interaction with the repositories and organizations where this user is added as a collaborator. This prevents access to public repositories on this instance.
users.allow_git_hook = Can create Git hooks
users.allow_git_hook_tooltip = Git hooks are executed as the OS user running Forgejo and will have the same level of host access. As a result, users with this special Git hook privilege can access and modify all Forgejo repositories as well as the database used by Forgejo. Consequently they are also able to gain Forgejo administrator privileges.
users.allow_import_local = Can import local repositories
users.local_import.description = Allow importing repositories from the server's local file system. This can be a security issue.
users.allow_create_organization = Can create organizations
users.organization_creation.description = Allow creation of new organizations.
users.update_profile = Update user account
users.delete_account = Delete user account
users.cannot_delete_self = You cannot delete yourself

View file

@ -110,46 +110,53 @@
<div class="inline field">
<div class="ui checkbox">
<label><strong>{{ctx.Locale.Tr "admin.users.is_activated"}}</strong></label>
<label>{{ctx.Locale.Tr "admin.users.is_activated"}}</label>
<input name="active" type="checkbox" {{if .User.IsActive}}checked{{end}}>
</div>
<span class="help tw-block">{{ctx.Locale.Tr "admin.users.activated.description"}}</span>
</div>
<div class="inline field">
<div class="ui checkbox">
<label><strong>{{ctx.Locale.Tr "admin.users.prohibit_login"}}</strong></label>
<label>{{ctx.Locale.Tr "admin.users.prohibit_login"}}</label>
<input name="prohibit_login" type="checkbox" {{if .User.ProhibitLogin}}checked{{end}} {{if (eq .User.ID .SignedUserID)}}disabled{{end}}>
</div>
<span class="help tw-block">{{ctx.Locale.Tr "admin.users.block.description"}}</span>
</div>
<div class="inline field">
<div class="ui checkbox">
<label><strong>{{ctx.Locale.Tr "admin.users.is_admin"}}</strong></label>
<label>{{ctx.Locale.Tr "admin.users.is_admin"}}</label>
<input name="admin" type="checkbox" {{if .User.IsAdmin}}checked{{end}}>
</div>
<span class="help tw-block">{{ctx.Locale.Tr "admin.users.admin.description"}}</span>
</div>
<div class="inline field">
<div class="ui checkbox">
<label><strong>{{ctx.Locale.Tr "admin.users.is_restricted"}}</strong></label>
<label>{{ctx.Locale.Tr "admin.users.is_restricted"}}</label>
<input name="restricted" type="checkbox" {{if .User.IsRestricted}}checked{{end}}>
</div>
<span class="help tw-block">{{ctx.Locale.Tr "admin.users.restricted.description"}}</span>
</div>
<div class="inline field {{if DisableGitHooks}}tw-hidden{{end}}">
<div class="ui checkbox" data-tooltip-content="{{ctx.Locale.Tr "admin.users.allow_git_hook_tooltip"}}">
<label><strong>{{ctx.Locale.Tr "admin.users.allow_git_hook"}}</strong></label>
<div class="ui checkbox">
<label>{{ctx.Locale.Tr "admin.users.allow_git_hook"}}</label>
<input name="allow_git_hook" type="checkbox" {{if .User.CanEditGitHook}}checked{{end}} {{if DisableGitHooks}}disabled{{end}}>
</div>
<span class="help tw-block">{{ctx.Locale.Tr "admin.users.allow_git_hook_tooltip"}}</span>
</div>
<div class="inline field {{if or (DisableImportLocal) (.DisableMigrations)}}tw-hidden{{end}}">
<div class="ui checkbox">
<label><strong>{{ctx.Locale.Tr "admin.users.allow_import_local"}}</strong></label>
<label>{{ctx.Locale.Tr "admin.users.allow_import_local"}}</label>
<input name="allow_import_local" type="checkbox" {{if .User.CanImportLocal}}checked{{end}} {{if DisableImportLocal}}disabled{{end}}>
</div>
<span class="help tw-block">{{ctx.Locale.Tr "admin.users.local_import.description"}}</span>
</div>
{{if not .DisableRegularOrgCreation}}
<div class="inline field">
<div class="ui checkbox">
<label><strong>{{ctx.Locale.Tr "admin.users.allow_create_organization"}}</strong></label>
<label>{{ctx.Locale.Tr "admin.users.allow_create_organization"}}</label>
<input name="allow_create_organization" type="checkbox" {{if .User.CanCreateOrganization}}checked{{end}}>
</div>
<span class="help tw-block">{{ctx.Locale.Tr "admin.users.organization_creation.description"}}</span>
</div>
{{end}}