summaryrefslogtreecommitdiffstats
path: root/app/controllers/users_controller.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2014-10-23 21:46:40 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2014-10-23 21:46:40 +0000
commitc2e73160daa7782d7a91f2b6a974a936c6f084da (patch)
tree62e174df69aba43cb5a84f2ddd278dc4562963f0 /app/controllers/users_controller.rb
parentca5946d82ebb96464a3d283be657bc24ce0c47f1 (diff)
downloadredmine-c2e73160daa7782d7a91f2b6a974a936c6f084da.tar.gz
redmine-c2e73160daa7782d7a91f2b6a974a936c6f084da.zip
Adds a single controller for users and groups memberships and support for adding multiple projects at once (#11702).
git-svn-id: http://svn.redmine.org/redmine/trunk@13498 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/users_controller.rb')
-rw-r--r--app/controllers/users_controller.rb23
1 files changed, 2 insertions, 21 deletions
diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb
index bb56fb285..d14914af4 100644
--- a/app/controllers/users_controller.rb
+++ b/app/controllers/users_controller.rb
@@ -19,13 +19,14 @@ class UsersController < ApplicationController
layout 'admin'
before_filter :require_admin, :except => :show
- before_filter :find_user, :only => [:show, :edit, :update, :destroy, :edit_membership, :destroy_membership]
+ before_filter :find_user, :only => [:show, :edit, :update, :destroy]
accept_api_auth :index, :show, :create, :update, :destroy
helper :sort
include SortHelper
helper :custom_fields
include CustomFieldsHelper
+ helper :principal_memberships
def index
sort_init 'login', 'asc'
@@ -173,26 +174,6 @@ class UsersController < ApplicationController
end
end
- def edit_membership
- @membership = Member.edit_membership(params[:membership_id], params[:membership], @user)
- @membership.save
- respond_to do |format|
- format.html { redirect_to edit_user_path(@user, :tab => 'memberships') }
- format.js
- end
- end
-
- def destroy_membership
- @membership = Member.find(params[:membership_id])
- if @membership.deletable?
- @membership.destroy
- end
- respond_to do |format|
- format.html { redirect_to edit_user_path(@user, :tab => 'memberships') }
- format.js
- end
- end
-
private
def find_user