Added support for OpenID identity

Added user roles management
Improvement CMS_HOOK_FORM_ALTER design.
Factorized code into CMS_WIDGET_COMPOSITE
Use general notion of CMS_WIDGET (and CMS_FORM allows CMS_WIDGET, and not just CMS_FORM_ITEM)
Fixed various CMS_WIDGET traversal, and fixed related issue for CMS forms
Fixed CMS_FORM_CHECKBOX_INPUT when no value was set.
Added CMS_FORM_DATA.cached_value .. to pass computed values during validation to submit actions (mainly for optimization)
Added support for @include=filename  in CMS_CONFIGURATION
Added CMS_WIDGET_TABLE as filled version of CMS_WIDGET_AGENT_TABLE (renamed from previous CMS_WIDGET_TABLE)
Many improvements to the CMS_FORM design
Some improvements to CMS_MODULE
...
This commit is contained in:
Jocelyn Fiat
2013-03-08 15:48:39 +01:00
parent 231b263a82
commit 617c48adcb
52 changed files with 2635 additions and 834 deletions

View File

@@ -9,6 +9,9 @@ class
inherit
CMS_MODULE
redefine
permissions
end
CMS_HOOK_MENU_ALTER
@@ -36,6 +39,7 @@ feature {CMS_SERVICE} -- Registration
service := a_service
a_service.map_uri ("/admin/", agent handle_admin (a_service, ?, ?))
a_service.map_uri ("/admin/users/", agent handle_admin_users (a_service, ?, ?))
a_service.map_uri ("/admin/roles/", agent handle_admin_user_roles (a_service, ?, ?))
a_service.map_uri ("/admin/blocks/", agent handle_admin_blocks (a_service, ?, ?))
a_service.map_uri ("/admin/modules/", agent handle_admin_modules (a_service, ?, ?))
a_service.map_uri ("/admin/logs/", agent handle_admin_logs (a_service, ?, ?))
@@ -55,10 +59,16 @@ feature -- Hooks
a_menu_system.management_menu.extend (lnk)
end
links: HASH_TABLE [CMS_MODULE_LINK, STRING]
-- Link indexed by path
permissions (a_service: CMS_SERVICE): LIST [CMS_PERMISSION]
do
create Result.make (0)
Result := Precursor (a_service)
Result.extend ("administer")
Result.extend ("administer users")
Result.extend ("administer user roles")
Result.extend ("administer content")
Result.extend ("administer logs")
Result.extend ("administer blocks")
Result.extend ("administer modules")
end
feature -- Handler
@@ -73,6 +83,11 @@ feature -- Handler
(create {ADMIN_USERS_CMS_EXECUTION}.make (req, res, cms)).execute
end
handle_admin_user_roles (cms: CMS_SERVICE; req: WSF_REQUEST; res: WSF_RESPONSE)
do
(create {ADMIN_USER_ROLES_CMS_EXECUTION}.make (req, res, cms)).execute
end
handle_admin_blocks (cms: CMS_SERVICE; req: WSF_REQUEST; res: WSF_RESPONSE)
do
(create {ADMIN_BLOCKS_CMS_EXECUTION}.make (req, res, cms)).execute