Object auth for ad_banner

This commit is contained in:
Matthew K. Fu JuYuan committed 2012-05-15 16:39:23 +08:00
1 parent 0a9f0bcc45
commit b23b5e8ec5
8 files changed
+34 -16

No files matched your search

+9 -2
View File
@@ -11,7 +11,10 @@ module Admin::AdBannerHelper
printable_ad_images.shuffle!
end
def sub_manager?(ad_banner)
ad_banner.authed_users(:edit).include?(current_user)
end
def show_ad_banner_permission_link(ad_banner)
type = 'edit'
oa = ad_banner.get_object_auth_by_title(type)
@@ -20,7 +23,11 @@ module Admin::AdBannerHelper
oa = ad_banner.get_object_auth_by_title(type)
end
# link_to t('announcement.bulletin.cate_auth'), edit_admin_object_auth_path(oa)
link_to t('admin.ad.cate_auth'),admin_object_auth_ob_auth_path(oa)
link_to t('admin.ad.cate_auth'),admin_object_auth_ob_auth_path(oa),:class => "btn btn-warning"
end
def at_least_module_manager
is_manager? || is_admin?
end
end