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
Tatuya Kamada
gitlab-ce
Commits
17a8ee57
Commit
17a8ee57
authored
Jan 21, 2013
by
Andrey Kumanyaev
Committed by
Dmitriy Zaporozhets
Jan 24, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove old data
parent
a7667ffc
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 addition
and
42 deletions
+1
-42
app/controllers/admin/teams_controller.rb
app/controllers/admin/teams_controller.rb
+0
-35
app/models/users_project.rb
app/models/users_project.rb
+1
-1
config/routes.rb
config/routes.rb
+0
-6
No files found.
app/controllers/admin/teams_controller.rb
View file @
17a8ee57
...
@@ -60,41 +60,6 @@ class Admin::TeamsController < Admin::ApplicationController
...
@@ -60,41 +60,6 @@ class Admin::TeamsController < Admin::ApplicationController
redirect_to
admin_user_teams_path
,
notice:
'UserTeam was successfully deleted.'
redirect_to
admin_user_teams_path
,
notice:
'UserTeam was successfully deleted.'
end
end
def
delegate_projects
unless
params
[
:project_ids
].
blank?
project_ids
=
params
[
:project_ids
]
access
=
params
[
:greatest_project_access
]
@team
.
assign_to_projects
(
project_ids
,
access
)
end
redirect_to
admin_team_path
(
@team
),
notice:
'Projects was successfully added.'
end
def
relegate_project
project
=
params
[
:project_id
]
@team
.
resign_from_project
(
project
)
redirect_to
admin_team_path
(
@team
),
notice:
'Project was successfully removed.'
end
def
add_members
unless
params
[
:user_ids
].
blank?
user_ids
=
params
[
:user_ids
]
access
=
params
[
:default_project_access
]
is_admin
=
params
[
:group_admin
]
@team
.
add_members
(
user_ids
,
access
,
is_admin
)
end
redirect_to
admin_team_path
(
@team
),
notice:
'Members was successfully added.'
end
def
remove_member
member
=
params
[
:member_id
]
@team
.
remove_member
(
member
)
redirect_to
admin_team_path
(
@team
),
notice:
'Member was successfully removed.'
end
private
private
def
user_team
def
user_team
...
...
app/models/users_project.rb
View file @
17a8ee57
...
@@ -41,7 +41,7 @@ class UsersProject < ActiveRecord::Base
...
@@ -41,7 +41,7 @@ class UsersProject < ActiveRecord::Base
scope
:masters
,
where
(
project_access:
MASTER
)
scope
:masters
,
where
(
project_access:
MASTER
)
scope
:in_project
,
->
(
project
)
{
where
(
project_id:
project
.
id
)
}
scope
:in_project
,
->
(
project
)
{
where
(
project_id:
project
.
id
)
}
scope
:in_projects
,
->
(
projects
)
{
where
(
project_id:
project
s
.
map
(
&
:id
)
)
}
scope
:in_projects
,
->
(
projects
)
{
where
(
project_id:
project
_ids
)
}
scope
:with_user
,
->
(
user
)
{
where
(
user_id:
user
.
id
)
}
scope
:with_user
,
->
(
user
)
{
where
(
user_id:
user
.
id
)
}
class
<<
self
class
<<
self
...
...
config/routes.rb
View file @
17a8ee57
...
@@ -70,12 +70,6 @@ Gitlab::Application.routes.draw do
...
@@ -70,12 +70,6 @@ Gitlab::Application.routes.draw do
end
end
end
end
resources
:teams
do
#, constraints: { id: /[^\/]+/ } do end
resources
:teams
do
#, constraints: { id: /[^\/]+/ } do end
member
do
post
:delegate_projects
delete
:relegate_project
post
:add_members
delete
:remove_member
end
scope
module: :teams
do
scope
module: :teams
do
resources
:members
,
only:
[
:edit
,
:update
,
:destroy
,
:new
,
:create
]
resources
:members
,
only:
[
:edit
,
:update
,
:destroy
,
:new
,
:create
]
resources
:projects
,
only:
[
:edit
,
:update
,
:destroy
,
:new
,
:create
]
resources
:projects
,
only:
[
:edit
,
:update
,
:destroy
,
:new
,
:create
]
...
...
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