Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
2ea4bb4c
Commit
2ea4bb4c
authored
Oct 16, 2018
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove access levels controllers
parent
84e95169
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
1 addition
and
70 deletions
+1
-70
config/routes/repository.rb
config/routes/repository.rb
+1
-8
ee/app/controllers/projects/protected_branches/application_controller.rb
...ers/projects/protected_branches/application_controller.rb
+0
-7
ee/app/controllers/projects/protected_branches/merge_access_levels_controller.rb
...ects/protected_branches/merge_access_levels_controller.rb
+0
-16
ee/app/controllers/projects/protected_branches/push_access_levels_controller.rb
...jects/protected_branches/push_access_levels_controller.rb
+0
-16
ee/app/controllers/projects/protected_tags/application_controller.rb
...rollers/projects/protected_tags/application_controller.rb
+0
-7
ee/app/controllers/projects/protected_tags/create_access_levels_controller.rb
...rojects/protected_tags/create_access_levels_controller.rb
+0
-16
No files found.
config/routes/repository.rb
View file @
2ea4bb4c
...
...
@@ -58,14 +58,7 @@ scope format: false do
resource
:release
,
only:
[
:edit
,
:update
]
end
resources
:protected_branches
,
only:
[
:index
,
:show
,
:create
,
:update
,
:destroy
,
:patch
],
constraints:
{
id:
Gitlab
::
PathRegex
.
git_reference_regex
}
do
## EE-specific
scope
module: :protected_branches
do
resources
:merge_access_levels
,
only:
[
:destroy
]
resources
:push_access_levels
,
only:
[
:destroy
]
end
end
resources
:protected_branches
,
only:
[
:index
,
:show
,
:create
,
:update
,
:destroy
,
:patch
],
constraints:
{
id:
Gitlab
::
PathRegex
.
git_reference_regex
}
resources
:protected_tags
,
only:
[
:index
,
:show
,
:create
,
:update
,
:destroy
]
end
...
...
ee/app/controllers/projects/protected_branches/application_controller.rb
deleted
100644 → 0
View file @
84e95169
class
Projects::ProtectedBranches::ApplicationController
<
Projects
::
ApplicationController
protected
def
load_protected_branch
@protected_branch
=
@project
.
protected_branches
.
find
(
params
[
:protected_branch_id
])
end
end
ee/app/controllers/projects/protected_branches/merge_access_levels_controller.rb
deleted
100644 → 0
View file @
84e95169
module
Projects
module
ProtectedBranches
class
MergeAccessLevelsController
<
ProtectedBranches
::
ApplicationController
before_action
:load_protected_branch
,
only:
[
:destroy
]
def
destroy
@merge_access_level
=
@protected_branch
.
merge_access_levels
.
find
(
params
[
:id
])
@merge_access_level
.
destroy
redirect_to
project_protected_branch_path
(
@project
,
@protected_branch
),
status:
302
,
notice:
"Successfully deleted.
#{
@merge_access_level
.
humanize
}
will not be able to merge into this protected branch."
end
end
end
end
ee/app/controllers/projects/protected_branches/push_access_levels_controller.rb
deleted
100644 → 0
View file @
84e95169
module
Projects
module
ProtectedBranches
class
PushAccessLevelsController
<
ProtectedBranches
::
ApplicationController
before_action
:load_protected_branch
,
only:
[
:destroy
]
def
destroy
@push_access_level
=
@protected_branch
.
push_access_levels
.
find
(
params
[
:id
])
@push_access_level
.
destroy
redirect_to
project_protected_branch_path
(
@project
,
@protected_branch
),
status:
302
,
notice:
"Successfully deleted.
#{
@push_access_level
.
humanize
}
will not be able to push to this protected branch."
end
end
end
end
ee/app/controllers/projects/protected_tags/application_controller.rb
deleted
100644 → 0
View file @
84e95169
class
Projects::ProtectedTags::ApplicationController
<
Projects
::
ApplicationController
protected
def
load_protected_tag
@protected_tag
=
@project
.
protected_tags
.
find
(
params
[
:protected_tag_id
])
end
end
ee/app/controllers/projects/protected_tags/create_access_levels_controller.rb
deleted
100644 → 0
View file @
84e95169
module
Projects
module
ProtectedTags
class
CreateAccessLevelsController
<
ProtectedTags
::
ApplicationController
before_action
:load_protected_tag
,
only:
[
:destroy
]
def
destroy
@create_access_level
=
@protected_tag
.
create_access_levels
.
find
(
params
[
:id
])
@create_access_level
.
destroy
redirect_to
project_protected_tag_path
(
@project
,
@protected_tag
),
status:
302
,
notice:
"Successfully deleted.
#{
@create_access_level
.
humanize
}
will not be able to create this protected tag."
end
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment