Merge branch 'master' of http://github.com/andreassteph/fetsite
This commit is contained in:
1
Gemfile
1
Gemfile
@@ -84,3 +84,4 @@ gem 'rmagick'
|
||||
|
||||
gem 'bootstrap-addons-rails'
|
||||
gem "jquery-fileupload-rails"
|
||||
gem "seed_dump", "~> 0.5.3"
|
||||
|
||||
@@ -180,6 +180,7 @@ GEM
|
||||
railties (~> 3.2.0)
|
||||
sass (>= 3.1.10)
|
||||
tilt (~> 1.3)
|
||||
seed_dump (0.5.3)
|
||||
simple_calendar (0.1.9)
|
||||
rails (>= 3.0)
|
||||
sprockets (2.2.2)
|
||||
@@ -239,6 +240,7 @@ DEPENDENCIES
|
||||
rolify
|
||||
rspec-rails
|
||||
sass-rails (~> 3.2)
|
||||
seed_dump (~> 0.5.3)
|
||||
simple_calendar (~> 0.1.9)
|
||||
sqlite3
|
||||
therubyracer
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
class UsersController < ApplicationController
|
||||
def index
|
||||
def index
|
||||
@users = User.all
|
||||
end
|
||||
def add_role
|
||||
end
|
||||
def add_role
|
||||
@user= User.find(params[:id])
|
||||
if (params[:role]=="fetuser" && can?(:addfetuser,User))
|
||||
@user.add_role(params[:role])
|
||||
@user.add_role(params[:role])
|
||||
end
|
||||
if (params[:role]=="fetadmin" && can?(:addfetadmin,User))
|
||||
@user.add_role(params[:role])
|
||||
@user.add_role(params[:role])
|
||||
end
|
||||
redirect_to users_url
|
||||
end
|
||||
def do_confirm
|
||||
end
|
||||
def do_confirm
|
||||
@user= User.find(params[:id])
|
||||
@user.confirm!
|
||||
|
||||
|
||||
redirect_to users_url
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user