diff options
author | Andrey Kumanyaev <me@zzet.org> | 2012-12-26 02:52:20 +0400 |
---|---|---|
committer | Andrey Kumanyaev <me@zzet.org> | 2012-12-26 19:52:15 +0400 |
commit | 9c574464a6051536ee83a93e8270a7dd9d85da33 (patch) | |
tree | 306ca832f425920b8ccfbff150dacb5e39359e4d /app/controllers/admin/groups_controller.rb | |
parent | 17ea019f4e43b4fb394544f9d86ab3016f54d28e (diff) | |
download | gitlab-ce-9c574464a6051536ee83a93e8270a7dd9d85da33.tar.gz |
Add functional in admin section
Diffstat (limited to 'app/controllers/admin/groups_controller.rb')
-rw-r--r-- | app/controllers/admin/groups_controller.rb | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/app/controllers/admin/groups_controller.rb b/app/controllers/admin/groups_controller.rb index a492e66611f..e41164d54c6 100644 --- a/app/controllers/admin/groups_controller.rb +++ b/app/controllers/admin/groups_controller.rb @@ -1,5 +1,5 @@ class Admin::GroupsController < AdminController - before_filter :group, only: [:edit, :show, :update, :destroy, :project_update] + before_filter :group, only: [:edit, :show, :update, :destroy, :project_update, :project_teams_update] def index @groups = Group.order('name ASC') @@ -12,6 +12,8 @@ class Admin::GroupsController < AdminController @projects = @projects.not_in_group(@group) if @group.projects.present? @projects = @projects.all @projects.reject!(&:empty_repo?) + + @users = User.active end def new @@ -65,6 +67,13 @@ class Admin::GroupsController < AdminController redirect_to :back, notice: 'Group was successfully updated.' end + def project_teams_update + @group.projects.each do |p| + p.add_users_ids_to_team(params[:user_ids], params[:project_access]) + end + redirect_to [:admin, @group], notice: 'Users was successfully added.' + end + def destroy @group.destroy |