Protected cache, export and feeds menu link.

This commit is contained in:
2016-02-17 15:20:38 +01:00
parent 75332c148d
commit 6716cb5575
2 changed files with 25 additions and 21 deletions

View File

@@ -133,6 +133,7 @@ feature -- Hooks
local local
lnk: CMS_LOCAL_LINK lnk: CMS_LOCAL_LINK
do do
if a_response.api.user_is_authenticated then
if if
a_response.has_permission ("manage " + {CMS_ADMIN_MODULE}.name) -- Note: admin user has all permissions enabled by default. a_response.has_permission ("manage " + {CMS_ADMIN_MODULE}.name) -- Note: admin user has all permissions enabled by default.
then then
@@ -155,6 +156,7 @@ feature -- Hooks
create lnk.make ("Export", "admin/export") create lnk.make ("Export", "admin/export")
a_menu_system.management_menu.extend (lnk) a_menu_system.management_menu.extend (lnk)
end end
end
note note
copyright: "2011-2015, Jocelyn Fiat, Javier Velilla, Eiffel Software and others" copyright: "2011-2015, Jocelyn Fiat, Javier Velilla, Eiffel Software and others"

View File

@@ -346,10 +346,12 @@ feature -- Hook
-- Hook execution on collection of menu contained by `a_menu_system' -- Hook execution on collection of menu contained by `a_menu_system'
-- for related response `a_response'. -- for related response `a_response'.
do do
if a_response.is_authenticated then
a_menu_system.navigation_menu.extend (create {CMS_LOCAL_LINK}.make ("Feeds", "feed_aggregation/")) a_menu_system.navigation_menu.extend (create {CMS_LOCAL_LINK}.make ("Feeds", "feed_aggregation/"))
if a_response.has_permission (permission__manage_feed_aggregator) then if a_response.has_permission (permission__manage_feed_aggregator) then
a_menu_system.management_menu.extend (create {CMS_LOCAL_LINK}.make ("Feeds (admin)", "admin/feed_aggregator/")) a_menu_system.management_menu.extend (create {CMS_LOCAL_LINK}.make ("Feeds (admin)", "admin/feed_aggregator/"))
end end
end end
end
end end