Fixed and improved various issue in admin module (especially the Role editing which was not working as expected.)

Added CMS_MODULE.permissions to allow module to declare the potential permissions.
Added support for CMS_LINK.is_forbidden, in relation with CMS_LOCAL_LINK.permission_arguments.
Split link "username (Logout)" into 2 links "username" and "logout".
Fixed/Changed the way auth modules alter the logout link based on "(Logout)" title, by safer solution based on `location' of the link.

Fixed usage of WSF_REQUEST.path_info by using percent_encoded_path_info which is not non unicode path info to be used most of the time.
Merged CMS_REPONSE.variables and CMS_REPONSE.values .
When possible, prefer usage of CMS_RESPONSE.user instead of CMS_REQUEST_UTIL.current_user (WSF_REQUEST) whenever it is possible.
When possible, prefer usage of CMS_RESPONSE.location, rather than usage of WSF_REQUEST.(percent_encoded_)path_info .
Code cleaning.
This commit is contained in:
2015-08-04 12:48:14 +02:00
parent c271f839e2
commit bba1d57ce3
38 changed files with 497 additions and 594 deletions

View File

@@ -49,7 +49,7 @@ feature -- Comparison
end
end
feature -- status report
feature -- Status report
is_active: BOOLEAN
-- Is current link active?
@@ -79,6 +79,14 @@ feature -- status report
deferred
end
feature -- Security
is_forbidden: BOOLEAN
-- Is Current link forbidden?
-- Current link could be disabled for current CMS user.
deferred
end
feature -- Element change
set_weight (a_weight: INTEGER)

View File

@@ -71,6 +71,12 @@ feature -- Status report
Result := attached children as l_children and then not l_children.is_empty
end
feature -- Security
is_forbidden: BOOLEAN
-- <Precursor>
-- Related to `permission_arguments' values.
feature -- Element change
set_title (a_title: detachable READABLE_STRING_GENERAL)
@@ -167,6 +173,16 @@ feature -- Status change
is_expandable: is_expandable = b
end
feature -- Security change
set_is_forbidden (b: BOOLEAN)
-- Set `is_forbidden' to `b'.
do
is_forbidden := b
ensure
is_forbidden: is_forbidden = b
end
feature {NONE} -- Implementation
internal_is_expandable: BOOLEAN