Commit 9134784e authored by Evan Read's avatar Evan Read

Standardize UI text for protected branches and protected tags

Also:

- Removes documentation from UI.
- Improves related documentation.

Changelog: changed
parent 6700c65b
......@@ -3,19 +3,16 @@
%section.settings.no-animate#js-protected-branches-settings{ class: ('expanded' if expanded), data: { qa_selector: 'protected_branches_settings_content' } }
.settings-header
%h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only
Protected branches
= s_("ProtectedBranch|Protected branches")
%button.btn.gl-button.btn-default.js-settings-toggle.qa-expand-protected-branches{ type: 'button' }
= expanded ? 'Collapse' : 'Expand'
%p
Keep stable branches secure, and force developers to use merge requests. #{link_to "What are protected branches?", help_page_path("user/project/protected_branches")}
= s_("ProtectedBranch|Keep stable branches secure and force developers to use merge requests.")
= link_to s_("ProtectedBranch|What are protected branches?"), help_page_path("user/project/protected_branches")
.settings-content
%p
By default, protected branches protect your code and:
%ul
%li Allow only users with Maintainer #{link_to "permissions", help_page_path("user/permissions")} to create new protected branches.
%li Allow only users with Maintainer permissions to push code.
%li Prevent <strong>anyone</strong> from #{link_to "force-pushing", help_page_path('topics/git/git_rebase', anchor: 'force-push')} to the branch.
%li Prevent <strong>anyone</strong> from deleting the branch.
= s_("ProtectedBranch|By default, protected branches restrict who can modify the branch.")
= link_to s_("ProtectedBranch|Learn more."), help_page_path("user/project/protected_branches", anchor: "who-can-modify-a-protected-branch")
- if can? current_user, :admin_project, @project
= content_for :create_protected_branch
......
......@@ -3,18 +3,16 @@
%section.settings.no-animate#js-protected-tags-settings{ class: ('expanded' if expanded), data: { qa_selector: 'protected_tag_settings_content' } }
.settings-header
%h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only
Protected tags
= s_("ProtectedTag|Protected tags")
%button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' }
= expanded ? 'Collapse' : 'Expand'
%p
Limit access to creating and updating tags. #{link_to "What are protected tags?", help_page_path("user/project/protected_tags")}
= s_("ProtectedTag|Limit access to creating and updating tags.")
= link_to s_("ProtectedTag|What are protected tags?"), help_page_path("user/project/protected_tags")
.settings-content
%p
By default, protected tags protect your code and:
%ul
%li Allow only users with Maintainer #{link_to "permissions", help_page_path("user/permissions")} to create tags.
%li Prevent <strong>anyone</strong> from updating tags.
%li Prevent <strong>anyone</strong> from deleting tags.
= s_("ProtectedTag|By default, protected branches restrict who can modify the tag.")
= link_to s_("ProtectedTag|Learn more."), help_page_path("user/project/protected_tags", anchor: "who-can-modify-a-protected-tag")
- if can? current_user, :admin_project, @project
= yield :create_protected_tag
......
......@@ -13,24 +13,24 @@ further restrictions on certain branches, they can be protected.
The default branch for your repository is protected by default.
## Who can access a protected branch
## Who can modify a protected branch
When a branch is protected, the default behavior enforces
these restrictions on the branch.
When a branch is protected, the default behavior enforces these restrictions on the branch.
| Action | Who can do it |
|--------------------------|---------------|
| Protect a branch | Maintainers only. |
| Push to the branch | GitLab administrators and anyone with **Allowed** permission. (*) |
| Force push to the branch | No one. |
| Delete the branch | No one. |
| Action | Who can do it |
|:-------------------------|:------------------------------------------------------------------|
| Protect a branch | Maintainers only. |
| Push to the branch | GitLab administrators and anyone with **Allowed** permission. (1) |
| Force push to the branch | No one. |
| Delete the branch | No one. |
(*) Users with the Developer role can create a project in a group,
but might not be allowed to initially push to the [default branch](repository/branches/default.md).
1. Users with the Developer role can create a project in a group, but might not be allowed to
initially push to the [default branch](repository/branches/default.md).
### Set the default branch protection level
Administrators can set a default branch protection level in the [Admin Area](../admin_area/settings/visibility_and_access_controls.md#default-branch-protection).
Administrators can set a default branch protection level in the
[Admin Area](../admin_area/settings/visibility_and_access_controls.md#default-branch-protection).
## Configure a protected branch
......@@ -176,10 +176,10 @@ When enabled, members who are can push to this branch can also force push.
## Require Code Owner approval on a protected branch **(PREMIUM)**
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/13251) in GitLab Premium 12.4.
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/13251) in GitLab Premium 12.4.
> - [In](https://gitlab.com/gitlab-org/gitlab/-/issues/35097) in [GitLab Premium](https://about.gitlab.com/pricing/) 13.5 and later, users and groups who can push to protected branches do not have to use a merge request to merge their feature branches. This means they can skip merge request approval rules.
You can require at least one approval by a
[Code Owner](code_owners.md) to a file changed by the
You can require at least one approval by a [Code Owner](code_owners.md) to a file changed by the
merge request.
To protect a new branch and enable Code Owner's approval:
......@@ -201,9 +201,6 @@ When enabled, all merge requests for these branches require approval
by a Code Owner per matched rule before they can be merged.
Additionally, direct pushes to the protected branch are denied if a rule is matched.
[In](https://gitlab.com/gitlab-org/gitlab/-/issues/35097) in [GitLab Premium](https://about.gitlab.com/pricing/) 13.5 and later,
users and groups who can push to protected branches do not have to use a merge request to merge their feature branches. Thus, they can skip merge request approval rules.
## Run pipelines on protected branches
The permission to merge or push to protected branches defines
......
......@@ -9,15 +9,24 @@ type: reference, howto
> [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/10356) in GitLab 9.1.
Protected tags allow control over who has permission to create tags as well as preventing accidental update or deletion once created. Each rule allows you to match either an individual tag name, or use wildcards to control multiple tags at once.
Protected tags:
- Allow control over who has permission to create tags.
- Prevent accidental update or deletion once created.
Each rule allows you to match either:
- An individual tag name.
- Wildcards to control multiple tags at once.
This feature evolved out of [protected branches](protected_branches.md)
## Overview
## Who can modify a protected tag
By default:
Protected tags prevent anyone from updating or deleting the tag, and prevent
creation of matching tags based on the permissions you have selected. By default,
anyone without Maintainer [permissions](../permissions.md) is prevented from creating tags.
- To create tags, you must have the [Maintainer role](../permissions.md).
- No one can update or delete tags.
## Configuring protected tags
......
......@@ -26345,12 +26345,21 @@ msgstr ""
msgid "ProtectedBranch|Branch:"
msgstr ""
msgid "ProtectedBranch|By default, protected branches restrict who can modify the branch."
msgstr ""
msgid "ProtectedBranch|Code owner approval"
msgstr ""
msgid "ProtectedBranch|Does not apply to users allowed to push. Optional sections are not enforced."
msgstr ""
msgid "ProtectedBranch|Keep stable branches secure and force developers to use merge requests."
msgstr ""
msgid "ProtectedBranch|Learn more."
msgstr ""
msgid "ProtectedBranch|Protect"
msgstr ""
......@@ -26360,6 +26369,9 @@ msgstr ""
msgid "ProtectedBranch|Protected branch (%{protected_branches_count})"
msgstr ""
msgid "ProtectedBranch|Protected branches"
msgstr ""
msgid "ProtectedBranch|Reject code pushes that change files listed in the CODEOWNERS file."
msgstr ""
......@@ -26375,6 +26387,9 @@ msgstr ""
msgid "ProtectedBranch|Toggle code owner approval"
msgstr ""
msgid "ProtectedBranch|What are protected branches?"
msgstr ""
msgid "ProtectedEnvironment|%{environment_name} will be writable for developers. Are you sure?"
msgstr ""
......@@ -26420,6 +26435,21 @@ msgstr ""
msgid "ProtectedEnvironment|Your environment has been unprotected"
msgstr ""
msgid "ProtectedTag|By default, protected branches restrict who can modify the tag."
msgstr ""
msgid "ProtectedTag|Learn more."
msgstr ""
msgid "ProtectedTag|Limit access to creating and updating tags."
msgstr ""
msgid "ProtectedTag|Protected tags"
msgstr ""
msgid "ProtectedTag|What are protected tags?"
msgstr ""
msgid "Protip: %{linkStart}Auto DevOps%{linkEnd} uses Kubernetes clusters to deploy your code!"
msgstr ""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment