diff --git a/app/controllers/admin/ad_banners_controller.rb b/app/controllers/admin/ad_banners_controller.rb index 37ac3fac6..d05622b00 100644 --- a/app/controllers/admin/ad_banners_controller.rb +++ b/app/controllers/admin/ad_banners_controller.rb @@ -1,10 +1,7 @@ class Admin::AdBannersController < OrbitBackendController - - before_filter :force_order_for_visitor,:only=>[:index, :show] - before_filter :force_order_for_user,:except => [:index, :show] - before_filter :for_app_sub_manager,:except => [:index, :show] - before_filter :for_app_manager,:except => [:index,:show,:update,:realtime_preview] - + open_for_visitor :only => [:index, :show] + open_for_manager :except => [:index,:show,:update,:realtime_preview] + open_for_sub_manager :except => [:index, :show] def rename @ad_banner = AdBanner.find(params[:id]) diff --git a/vendor/built_in_modules/ad_banner/init.rb b/vendor/built_in_modules/ad_banner/init.rb index 80e7d2788..a02257302 100644 --- a/vendor/built_in_modules/ad_banner/init.rb +++ b/vendor/built_in_modules/ad_banner/init.rb @@ -11,6 +11,7 @@ module AdBanner update_info 'some update_info' taggable + authorizable # front_end do # app_page 'bulletins' @@ -65,11 +66,6 @@ module AdBanner :active_for_tag => 'Announcement', :available_for => [:manager] - context_link 'module_authorization', - :link_path=>"admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {title: 'AdBanner'}))", - :priority=>6, - :active_for_app_auth => 'ad_banners', - :available_for => [:admin] end end end diff --git a/vendor/built_in_modules/calendar_new/app/controllers/panel/calendar_new/back_end/events_controller.rb b/vendor/built_in_modules/calendar_new/app/controllers/panel/calendar_new/back_end/events_controller.rb index 62765da07..abb0441cd 100644 --- a/vendor/built_in_modules/calendar_new/app/controllers/panel/calendar_new/back_end/events_controller.rb +++ b/vendor/built_in_modules/calendar_new/app/controllers/panel/calendar_new/back_end/events_controller.rb @@ -1,4 +1,5 @@ class Panel::CalendarNew::BackEnd::EventsController < OrbitBackendController + open_for_visitor :only => [:index, :show] # GET /events # GET /events.json diff --git a/vendor/built_in_modules/calendar_new/init.rb b/vendor/built_in_modules/calendar_new/init.rb index 17c1e32d5..c1aee0c8b 100644 --- a/vendor/built_in_modules/calendar_new/init.rb +++ b/vendor/built_in_modules/calendar_new/init.rb @@ -39,11 +39,6 @@ module CalendarNew :active_for_tag => 'CalendarNew', :available_for => [:manager] - context_link 'module_authorization', - :link_path=>"admin_authorizations_path(get_module_app.key)", - :priority=>6, - :available_for => [:manager] - context_link 'calendar.color', :link_path=>"panel_calendar_new_back_end_event_categories_path" , :priority=>3, diff --git a/vendor/built_in_modules/gallery/app/controllers/panel/gallery/back_end/albums_controller.rb b/vendor/built_in_modules/gallery/app/controllers/panel/gallery/back_end/albums_controller.rb index 5440d972d..e9efa9ab3 100644 --- a/vendor/built_in_modules/gallery/app/controllers/panel/gallery/back_end/albums_controller.rb +++ b/vendor/built_in_modules/gallery/app/controllers/panel/gallery/back_end/albums_controller.rb @@ -1,19 +1,8 @@ class Panel::Gallery::BackEnd::AlbumsController < OrbitBackendController - include AdminHelper - - # before_filter :force_order_for_user, :except => [:index,:get_album_json,:get_imgs_json] - - before_filter :force_order_for_visitor,:only=>[:index,:show,:get_album_json,:get_imgs_json,:get_albums,:imgs] - before_filter :force_order_for_user,:except => [:index,:show,:get_album_json,:get_imgs_json,:get_albums,:imgs] - before_filter :for_app_sub_manager,:except => [:index,:show,:get_album_json,:get_imgs_json,:get_albums,:imgs] + # before_filter lambda def index - if is_manager? || is_admin? || is_sub_manager? - @authenticated = true #turn this value to false for view only - else - @authenticated = false - end @categories = get_categories_for_index @albums = GalleryAlbum.all @tags = get_tags @@ -24,11 +13,6 @@ class Panel::Gallery::BackEnd::AlbumsController < OrbitBackendController end def show - if is_manager? || is_admin? || is_sub_manager? - @authenticated = true #turn this value to false for view only - else - @authenticated = false - end @album = GalleryAlbum.find(params[:id]) @images = @album.gallery_images end diff --git a/vendor/built_in_modules/location/app/controllers/panel/location/back_end/locations_controller.rb b/vendor/built_in_modules/location/app/controllers/panel/location/back_end/locations_controller.rb index 3f3119ea7..c1a2bab26 100644 --- a/vendor/built_in_modules/location/app/controllers/panel/location/back_end/locations_controller.rb +++ b/vendor/built_in_modules/location/app/controllers/panel/location/back_end/locations_controller.rb @@ -1,9 +1,6 @@ class Panel::Location::BackEnd::LocationsController < OrbitBackendController include AdminHelper - before_filter :force_order_for_visitor,:only => [:index, :new, :edit, :create, :update, :delete] - before_filter :force_order_for_user,:except => [:get_locations,:index,:get_categories] - def index @location_infos = LocationInfo.all @categories = get_categories_for_index diff --git a/vendor/built_in_modules/location/init.rb b/vendor/built_in_modules/location/init.rb index 843ef56a5..a0767bc78 100644 --- a/vendor/built_in_modules/location/init.rb +++ b/vendor/built_in_modules/location/init.rb @@ -32,6 +32,7 @@ module Location # end categorizable + authorizable side_bar do head_label_i18n 'location.location',:icon_class=>"icons-location"