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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
61723900
Commit
61723900
authored
Mar 24, 2013
by
Andrew8xx8
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
User Teams specific code moved to user_teams controller
parent
b49cfbc1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
8 deletions
+7
-8
app/controllers/projects/application_controller.rb
app/controllers/projects/application_controller.rb
+0
-8
app/controllers/projects/teams_controller.rb
app/controllers/projects/teams_controller.rb
+7
-0
No files found.
app/controllers/projects/application_controller.rb
View file @
61723900
class
Projects::ApplicationController
<
ApplicationController
before_filter
:authorize_admin_team_member!
protected
def
user_team
@team
||=
UserTeam
.
find_by_path
(
params
[
:id
])
end
end
app/controllers/projects/teams_controller.rb
View file @
61723900
class
Projects::TeamsController
<
Projects
::
ApplicationController
before_filter
:authorize_admin_team_member!
def
available
@teams
=
current_user
.
is_admin?
?
UserTeam
.
scoped
:
current_user
.
user_teams
@teams
=
@teams
.
without_project
(
project
)
...
...
@@ -24,4 +26,9 @@ class Projects::TeamsController < Projects::ApplicationController
redirect_to
project_team_index_path
(
project
)
end
protected
def
user_team
@team
||=
UserTeam
.
find_by_path
(
params
[
:id
])
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