Updated Authorizations for Adbanner, Calendar, Location
This commit is contained in:
parent
452da1b8ec
commit
4c217ec12f
|
@ -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])
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
class Panel::CalendarNew::BackEnd::EventsController < OrbitBackendController
|
||||
open_for_visitor :only => [:index, :show]
|
||||
# GET /events
|
||||
# GET /events.json
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -32,6 +32,7 @@ module Location
|
|||
# end
|
||||
|
||||
categorizable
|
||||
authorizable
|
||||
|
||||
side_bar do
|
||||
head_label_i18n 'location.location',:icon_class=>"icons-location"
|
||||
|
|
Loading…
Reference in New Issue