- Restructuring the assets

- Worked on the schedule
- Removed some gems
This commit is contained in:
Matt Barringer 2013-01-11 15:00:54 +01:00
parent a9207671b8
commit b801f0dc19
123 changed files with 13587 additions and 33123 deletions

View file

@ -1,6 +1,5 @@
class ApplicationController < ActionController::Base
include ApplicationHelper
protect_from_forgery
def verify_user
@ -8,7 +7,7 @@ class ApplicationController < ActionController::Base
if (current_user.nil?)
redirect_to '/accounts/sign_in'
return
return false
end
@conference = Conference.find_all_by_short_title(params[:conference_id]).first
@ -19,14 +18,18 @@ class ApplicationController < ActionController::Base
end
def verify_organizer
verify_user
if !verify_user
return
end
## Todo simplify this
redirect_to '/' unless has_role?(current_user, 'admin') || has_role?(current_user, 'organizer')
end
def verify_admin
verify_user
if !verify_user
return
end
redirect_to '/' unless has_role?(current_user, 'admin')
end