diff options
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/admin/groups_controller.rb | 4 | ||||
-rw-r--r-- | app/controllers/users_controller.rb | 2 |
2 files changed, 2 insertions, 4 deletions
diff --git a/app/controllers/admin/groups_controller.rb b/app/controllers/admin/groups_controller.rb index c38461c89db..6e6c8d54e29 100644 --- a/app/controllers/admin/groups_controller.rb +++ b/app/controllers/admin/groups_controller.rb @@ -66,14 +66,12 @@ class Admin::GroupsController < Admin::ApplicationController end def project_teams_update - @group.add_users_to_project_teams(params[:user_ids].split(','), params[:project_access]) + @group.add_users(params[:user_ids].split(','), params[:group_access]) redirect_to [:admin, @group], notice: 'Users were successfully added.' end def destroy - @group.truncate_teams - @group.destroy redirect_to admin_groups_path, notice: 'Group was successfully deleted.' diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 4947c33f959..028af8ff59f 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -3,7 +3,7 @@ class UsersController < ApplicationController def show @user = User.find_by_username!(params[:username]) - @projects = @user.authorized_projects.where('projects.id in (?)', current_user.authorized_projects.map(&:id)) + @projects = @user.authorized_projects.where('projects.id in (?)', current_user.authorized_projects.map(&:id)).order('namespace_id DESC') @events = @user.recent_events.where(project_id: @projects.map(&:id)).limit(20) @title = @user.name |