=link_to'Unprotect',[@project.namespace.becomes(Namespace),@project,protected_branch],data: {confirm: 'Branch will be writable for developers. Are you sure?'},method: :delete,class: "btn btn-warning btn-sm pull-right"
@@ -17,7 +17,6 @@ class AccessDeniedError < StandardError; end
PROTECTION_NONE=0
PROTECTION_DEV_CAN_PUSH=1
PROTECTION_FULL=2
PROTECTION_DEV_CAN_MERGE=3
class<<self
defvalues
...
...
@@ -55,7 +54,6 @@ def sym_options
defprotection_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,