Merge branch 'master' into es17.01

# Conflicts:
#	examples/demo/demo.ecf
#	modules/admin/admin-safe.ecf
This commit is contained in:
Jocelyn Fiat
2017-03-30 12:03:41 +02:00
27 changed files with 815 additions and 60 deletions

View File

@@ -19,6 +19,7 @@
<library name="error" location="$ISE_LIBRARY\contrib\library\utility\general\error\error.ecf"/>
<library name="http" location="$ISE_LIBRARY\contrib\library\network\protocol\http\http.ecf"/>
<library name="http_authorization" location="$ISE_LIBRARY\contrib\library\web\authentication\http_authorization\http_authorization.ecf" readonly="false"/>
<library name="text_filter" location="$ISE_LIBRARY\unstable\library\text\text_filter\text_filter.ecf"/>
<library name="time" location="$ISE_LIBRARY\library\time\time.ecf"/>
<library name="wsf" location="$ISE_LIBRARY\contrib\library\web\framework\ewf\wsf\wsf.ecf"/>
<library name="wsf_extension" location="$ISE_LIBRARY\contrib\library\web\framework\ewf\wsf\wsf_extension.ecf" readonly="false"/>

View File

@@ -36,6 +36,7 @@ feature -- Security
Result.force ("clear blocks cache")
Result.force ("admin export")
Result.force ("admin import")
Result.force ("admin formats")
end
feature {NONE} -- Router/administration
@@ -48,6 +49,7 @@ feature {NONE} -- Router/administration
l_modules_handler: CMS_ADMIN_MODULES_HANDLER
l_users_handler: CMS_ADMIN_USERS_HANDLER
l_roles_handler: CMS_ADMIN_ROLES_HANDLER
l_formats_handler: CMS_ADMIN_FORMATS_HANDLER
l_user_handler: CMS_USER_HANDLER
l_role_handler: CMS_ROLE_HANDLER
@@ -58,6 +60,7 @@ feature {NONE} -- Router/administration
l_admin_import_handler: CMS_ADMIN_IMPORT_HANDLER
l_admin_path_alias_handler: CMS_ADMIN_PATH_ALIAS_HANDLER
l_uri_mapping: WSF_URI_MAPPING
do
create l_admin_handler.make (a_api)
@@ -76,6 +79,13 @@ feature {NONE} -- Router/administration
create l_uri_mapping.make_trailing_slash_ignored ("/roles", l_roles_handler)
a_router.map (l_uri_mapping, a_router.methods_get_post)
create l_formats_handler.make (a_api)
create l_uri_mapping.make_trailing_slash_ignored ("/formats", l_formats_handler)
a_router.map (l_uri_mapping, a_router.methods_get_post)
create l_uri_mapping.make_trailing_slash_ignored ("/formats", l_formats_handler)
a_router.handle ("/formats/{format-id}", l_formats_handler, a_router.methods_get_post)
a_router.handle ("/formats/{format-id}/add", l_formats_handler, a_router.methods_get_post)
create l_admin_logs_handler.make (a_api)
create l_uri_mapping.make_trailing_slash_ignored ("/logs", l_admin_logs_handler)
a_router.map (l_uri_mapping, a_router.methods_get)
@@ -108,6 +118,7 @@ feature {NONE} -- Router/administration
a_router.handle ("/role/{id}", l_role_handler, a_router.methods_get)
a_router.handle ("/role/{id}/edit", l_role_handler, a_router.methods_get_post)
a_router.handle ("/role/{id}/delete", l_role_handler, a_router.methods_get_post)
end
feature -- Hooks
@@ -137,6 +148,10 @@ feature -- Hooks
create lnk.make ("Module", l_api.administration_path_location ("modules"))
lnk.set_permission_arguments (<<"manage module">>)
admin_lnk.extend (lnk)
create lnk.make ("Formats", l_api.administration_path_location ("formats"))
lnk.set_permission_arguments (<<"admin formats">>)
admin_lnk.extend (lnk)
-- Per module cache permission!

View File

@@ -109,7 +109,7 @@ feature -- Execution
if l_op.same_string ("Install modules") then
create {GENERIC_VIEW_CMS_RESPONSE} r.make (req, res, api)
if attached api.setup.string_8_item ("admin.installation_access") as l_access then
if attached api.setup.string_8_item ("administration.installation_access") as l_access then
if l_access.is_case_insensitive_equal ("none") then
l_denied := True
elseif l_access.is_case_insensitive_equal ("permission") then