diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-03-14 12:38:43 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-03-14 12:38:43 +0200 |
commit | 441d25618809c295349f7dae4e45bfbbc0fb7144 (patch) | |
tree | 1fce09c3098028fa96bdc1a95092c925e7936e82 /app/controllers | |
parent | f4f36f78ddb3d720ad7ae89ecea300c9f48775c7 (diff) | |
download | gitlab-ce-441d25618809c295349f7dae4e45bfbbc0fb7144.tar.gz |
Rebuild team area
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/teams/projects_controller.rb | 21 | ||||
-rw-r--r-- | app/controllers/teams_controller.rb | 2 |
2 files changed, 4 insertions, 19 deletions
diff --git a/app/controllers/teams/projects_controller.rb b/app/controllers/teams/projects_controller.rb index e87889b4046..81ffa238b46 100644 --- a/app/controllers/teams/projects_controller.rb +++ b/app/controllers/teams/projects_controller.rb @@ -1,20 +1,4 @@ class Teams::ProjectsController < Teams::ApplicationController - - skip_before_filter :authorize_manage_user_team!, only: [:index] - - def index - @projects = user_team.projects - @avaliable_projects = current_user.admin? ? Project.without_team(user_team) : current_user.owned_projects.without_team(user_team) - end - - def new - user_team - @avaliable_projects = current_user.owned_projects.scoped - @avaliable_projects = @avaliable_projects.without_team(user_team) if user_team.projects.any? - - redirect_to team_projects_path(user_team), notice: "No avalible projects." unless @avaliable_projects.any? - end - def create redirect_to :back if params[:project_ids].blank? @@ -28,7 +12,7 @@ class Teams::ProjectsController < Teams::ApplicationController # Assign projects to team user_team.assign_to_projects(project_ids, access) - redirect_to team_projects_path(user_team), notice: 'Team of users was successfully assigned to projects.' + redirect_to edit_team_path(user_team), notice: 'Team of users was successfully assigned to projects.' end def edit @@ -37,7 +21,7 @@ class Teams::ProjectsController < Teams::ApplicationController def update if user_team.update_project_access(team_project, params[:greatest_project_access]) - redirect_to team_projects_path(user_team), notice: 'Access was successfully updated.' + redirect_to edit_team_path(user_team), notice: 'Access was successfully updated.' else render :edit end @@ -53,5 +37,4 @@ class Teams::ProjectsController < Teams::ApplicationController def team_project @project ||= user_team.projects.find_with_namespace(params[:id]) end - end diff --git a/app/controllers/teams_controller.rb b/app/controllers/teams_controller.rb index 4861892d36e..26c1d84f86b 100644 --- a/app/controllers/teams_controller.rb +++ b/app/controllers/teams_controller.rb @@ -14,6 +14,8 @@ class TeamsController < ApplicationController end def edit + projects + @avaliable_projects = current_user.admin? ? Project.without_team(user_team) : current_user.owned_projects.without_team(user_team) end def update |