Sha256: 00d90a7e40af6bc7865c8f1873f6f076dc677bab6a831d6a9373c9234a7fdefa

Contents?: true

Size: 514 Bytes

Versions: 5

Compression:

Stored size: 514 Bytes

Contents

class Spud::Admin::ApplicationController < Spud::ApplicationController
	before_filter :require_admin_user
	add_breadcrumb "Dashboard", :spud_admin_root_path
	layout 'spud/admin/application'
	respond_to :html,:json,:xml,:js
	unloadable


	private
	def require_admin_user
		return false if !require_user
		if !@current_user.super_admin && current_user_permissions.count == 0
			flash[:error] = "User must be an administrator to view this area."
			redirect_to root_url() and return false
		end
		return true
	end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
spud_core-0.8.19 app/controllers/spud/admin/application_controller.rb
spud_core-0.8.18 app/controllers/spud/admin/application_controller.rb
spud_core-0.8.17 app/controllers/spud/admin/application_controller.rb
spud_core-0.8.16 app/controllers/spud/admin/application_controller.rb
spud_core-0.8.15 app/controllers/spud/admin/application_controller.rb