New authorization

This commit is contained in:
chris committed 2013-08-21 13:42:29 +08:00
1 parent d24bd176cc
commit c474fa063f
25 files changed
+440 -172

No files matched your search

@@ -3,11 +3,7 @@ class Panel::Announcement::BackEnd::BulletinsController < OrbitBackendController
before_filter :clean_values, :only => [:create, :update]
# before_filter :for_admin_only,:only => [:]
# before_filter :for_app_manager,:only => [:index,:show,]
before_filter :force_order_for_visitor,:only=>[:index,:show,:get_sorted_and_filtered_bulletins]
before_filter :force_order_for_user,:except => [:index,:show,:get_sorted_and_filtered_bulletins]
before_filter :for_app_sub_manager,:except => [:index,:show,:get_sorted_and_filtered_bulletins]
prepend_before_filter :set_public, :only => [:index, :show, :get_sorted_and_filtered_bulletins]
before_filter :only => [ :new, :create, :edit, :update ] do |controller|
@categories = get_categories_for_form
@@ -1,9 +1,6 @@
class Panel::PageContent::BackEnd::PageContextsController < OrbitBackendController
before_filter :force_order_for_visitor,:only=>[:index]
before_filter :force_order_for_user,:except => [:index]
before_filter :for_app_manager,:except => [:index]
before_filter :for_app_sub_manager,:except => [:index]
prepend_before_filter :set_public, :only => [:index]
#before_filter :is_admin?
@@ -5,7 +5,7 @@ class PageContext
include Mongoid::Timestamps
include Mongoid::MultiParameterAttributes
include Impressionist::Impressionable
include OrbitCoreLib::ObjectAuthable
include OrbitModel::Authorizable
is_impressionable :counter_cache => { :column_name => :view_count }