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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
112e9198
Commit
112e9198
authored
Jun 26, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unnecessary namespaced resource
parent
a5dbe353
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
31 deletions
+10
-31
app/controllers/admin/members_controller.rb
app/controllers/admin/members_controller.rb
+9
-0
app/controllers/admin/projects/application_controller.rb
app/controllers/admin/projects/application_controller.rb
+0
-11
app/controllers/admin/projects/members_controller.rb
app/controllers/admin/projects/members_controller.rb
+0
-17
config/routes.rb
config/routes.rb
+1
-3
No files found.
app/controllers/admin/members_controller.rb
0 → 100644
View file @
112e9198
class
Admin::MembersController
<
Admin
::
ApplicationController
def
destroy
user
=
User
.
find_by_username
(
params
[
:id
])
project
=
Project
.
find_with_namespace
(
params
[
:project_id
])
project
.
users_projects
.
where
(
user_id:
user
).
first
.
destroy
redirect_to
:back
end
end
app/controllers/admin/projects/application_controller.rb
deleted
100644 → 0
View file @
a5dbe353
# Provides a base class for Admin controllers to subclass
#
# Automatically sets the layout and ensures an administrator is logged in
class
Admin::Projects::ApplicationController
<
Admin
::
ApplicationController
protected
def
project
@project
||=
Project
.
find_with_namespace
(
params
[
:project_id
])
end
end
app/controllers/admin/projects/members_controller.rb
deleted
100644 → 0
View file @
a5dbe353
class
Admin::Projects::MembersController
<
Admin
::
Projects
::
ApplicationController
def
destroy
team_member_relation
.
destroy
redirect_to
:back
end
private
def
team_member
@member
||=
project
.
users
.
find_by_username
(
params
[
:id
])
end
def
team_member_relation
team_member
.
users_projects
.
find_by_project_id
(
project
)
end
end
config/routes.rb
View file @
112e9198
...
...
@@ -88,10 +88,8 @@ Gitlab::Application.routes.draw do
resource
:background_jobs
,
controller:
'background_jobs'
,
only:
[
:show
]
resources
:projects
,
constraints:
{
id:
/[a-zA-Z.\/0-9_\-]+/
},
only:
[
:index
,
:show
]
do
scope
module: :projects
,
constraints:
{
id:
/[a-zA-Z.\/0-9_\-]+/
}
do
resources
:members
,
only:
[
:destroy
]
end
end
root
to:
"dashboard#index"
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