BigW Consortium Gitlab

Commit 17a8ee57 by Andrey Kumanyaev Committed by Dmitriy Zaporozhets

Remove old data

parent a7667ffc
......@@ -60,41 +60,6 @@ class Admin::TeamsController < Admin::ApplicationController
redirect_to admin_user_teams_path, notice: 'UserTeam was successfully deleted.'
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
def user_team
......
......@@ -41,7 +41,7 @@ class UsersProject < ActiveRecord::Base
scope :masters, where(project_access: MASTER)
scope :in_project, ->(project) { where(project_id: project.id) }
scope :in_projects, ->(projects) { where(project_id: projects.map(&:id)) }
scope :in_projects, ->(projects) { where(project_id: project_ids) }
scope :with_user, ->(user) { where(user_id: user.id) }
class << self
......
......@@ -70,12 +70,6 @@ Gitlab::Application.routes.draw do
end
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
resources :members, only: [:edit, :update, :destroy, :new, :create]
resources :projects, only: [:edit, :update, :destroy, :new, :create]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment