diff options
| author | Sean McGivern <sean@gitlab.com> | 2017-11-20 16:09:56 +0000 |
|---|---|---|
| committer | Sean McGivern <sean@gitlab.com> | 2017-11-20 16:09:56 +0000 |
| commit | c82ae26565fdbffd205476929a2c08c9448a1365 (patch) | |
| tree | 410f26b3f7307b7ff246402f62612832e1eb6d7b | |
| parent | 4b78f70fc4c9b7f807db497e4ced12a92744bc3e (diff) | |
| download | gitlab-ce-c82ae26565fdbffd205476929a2c08c9448a1365.tar.gz | |
Clarify wording of protected branch settings for the default branch
No-one is allowed to force push to a protected branch, or delete it. That's
correct in the documentation, but was wrong in the drop-down.
| -rw-r--r-- | changelogs/unreleased/fix-protected-branches-descriptions.yml | 5 | ||||
| -rw-r--r-- | doc/api/settings.md | 2 | ||||
| -rw-r--r-- | lib/gitlab/access.rb | 6 |
3 files changed, 9 insertions, 4 deletions
diff --git a/changelogs/unreleased/fix-protected-branches-descriptions.yml b/changelogs/unreleased/fix-protected-branches-descriptions.yml new file mode 100644 index 00000000000..8e233d9defd --- /dev/null +++ b/changelogs/unreleased/fix-protected-branches-descriptions.yml @@ -0,0 +1,5 @@ +--- +title: Clarify wording of protected branch settings for the default branch +merge_request: +author: +type: other diff --git a/doc/api/settings.md b/doc/api/settings.md index 4e24e4bbfc3..b27220f57f4 100644 --- a/doc/api/settings.md +++ b/doc/api/settings.md @@ -79,7 +79,7 @@ PUT /application/settings | `clientside_sentry_enabled` | boolean | no | Enable Sentry error reporting for the client side | | `container_registry_token_expire_delay` | integer | no | Container Registry token duration in minutes | | `default_artifacts_expire_in` | string | no | Set the default expiration time for each job's artifacts | -| `default_branch_protection` | integer | no | Determine if developers can push to master. Can take `0` _(not protected, both developers and masters can push new commits, force push or delete the branch)_, `1` _(partially protected, developers can push new commits, but cannot force push or delete the branch, masters can do anything)_ or `2` _(fully protected, developers cannot push new commits, force push or delete the branch, masters can do anything)_ as a parameter. Default is `2`. | +| `default_branch_protection` | integer | no | Determine if developers can push to master. Can take `0` _(not protected, both developers and masters can push new commits, force push, or delete the branch)_, `1` _(partially protected, developers and masters can push new commits, but cannot force push or delete the branch)_ or `2` _(fully protected, developers cannot push new commits, but masters can; no-one can force push or delete the branch)_ as a parameter. Default is `2`. | | `default_group_visibility` | string | no | What visibility level new groups receive. Can take `private`, `internal` and `public` as a parameter. Default is `private`. | | `default_project_visibility` | string | no | What visibility level new projects receive. Can take `private`, `internal` and `public` as a parameter. Default is `private`. | | `default_projects_limit` | integer | no | Project limit per user. Default is `100000` | diff --git a/lib/gitlab/access.rb b/lib/gitlab/access.rb index b4012ebbb99..7127948cf00 100644 --- a/lib/gitlab/access.rb +++ b/lib/gitlab/access.rb @@ -58,9 +58,9 @@ module Gitlab def protection_options { "Not protected: Both developers and masters can push new commits, force push, or delete the branch." => PROTECTION_NONE, - "Protected against pushes: Developers cannot push new commits, but are allowed to accept merge requests to the branch." => PROTECTION_DEV_CAN_MERGE, - "Partially protected: Developers can push new commits, but cannot force push or delete the branch. Masters can do all of those." => PROTECTION_DEV_CAN_PUSH, - "Fully protected: Developers cannot push new commits, force push, or delete the branch. Only masters can do any of those." => PROTECTION_FULL + "Protected against pushes: Developers cannot push new commits, but are allowed to accept merge requests to the branch. Masters can push to the branch." => PROTECTION_DEV_CAN_MERGE, + "Partially protected: Both developers and masters can push new commits, but cannot force push or delete the branch." => PROTECTION_DEV_CAN_PUSH, + "Fully protected: Developers cannot push new commits, but masters can. No-one can force push or delete the branch." => PROTECTION_FULL } end |
