Added support for path_aliases.
Refactored CMS_MODULE.router (..): WSF_ROUTER design, to create only one router object of type CMS_ROUTER. Added optional CMS_NODE.link: CMS_LOCAL_LINK Reviewed permissions related to node module. Refactor and add CMS_STORAGE_SQL(_BUILDER) abstractions for implementation relying only on SQL statements. Factorized sql builder initialization (to work for sqlite and mysql storage builders). Added CMS_RESPONSE.formatted_string (a_text: READABLE_STRING_GENERAL; args: TUPLE): STRING_32 Added function "translation", but not implemented for now. Updated indexing notes and comments. Code cleaning.
This commit is contained in:
@@ -14,6 +14,11 @@ inherit
|
||||
default_create
|
||||
end
|
||||
|
||||
CMS_USER_STORAGE_NULL
|
||||
undefine
|
||||
default_create
|
||||
end
|
||||
|
||||
REFACTORING_HELPER
|
||||
rename
|
||||
default_create as default_create_rh
|
||||
@@ -40,74 +45,34 @@ feature -- Status report
|
||||
Result := True
|
||||
end
|
||||
|
||||
feature -- Access: user
|
||||
feature -- URL aliases
|
||||
|
||||
has_user: BOOLEAN
|
||||
-- Has any user?
|
||||
set_path_alias (a_source: READABLE_STRING_8; a_alias: READABLE_STRING_8)
|
||||
-- <Precursor>.
|
||||
do
|
||||
end
|
||||
|
||||
users: LIST [CMS_USER]
|
||||
do
|
||||
create {ARRAYED_LIST [CMS_USER]} Result.make (0)
|
||||
end
|
||||
|
||||
user_by_id (a_id: like {CMS_USER}.id): detachable CMS_USER
|
||||
replace_path_alias (a_source: READABLE_STRING_8; a_previous_alias: detachable READABLE_STRING_8; a_alias: READABLE_STRING_8)
|
||||
-- Replace eventual previous alias `a_previous_alias' with a new alias `a_alias'
|
||||
-- on source `a_source'.
|
||||
do
|
||||
end
|
||||
|
||||
user_by_name (a_name: like {CMS_USER}.name): detachable CMS_USER
|
||||
unset_path_alias (a_source: READABLE_STRING_8; a_alias: READABLE_STRING_8)
|
||||
-- Unalias `a_source' from `a_alias'.
|
||||
do
|
||||
end
|
||||
|
||||
user_by_email (a_email: like {CMS_USER}.email): detachable CMS_USER
|
||||
path_alias (a_source: READABLE_STRING_8): detachable READABLE_STRING_8
|
||||
-- Return eventual path alias associated with `a_source'.
|
||||
do
|
||||
end
|
||||
|
||||
is_valid_credential (l_auth_login, l_auth_password: READABLE_STRING_32): BOOLEAN
|
||||
source_of_path_alias (a_alias: READABLE_STRING_8): detachable READABLE_STRING_8
|
||||
-- Source path for alias `a_alias'.
|
||||
do
|
||||
end
|
||||
|
||||
feature -- Change: user
|
||||
|
||||
new_user (a_user: CMS_USER)
|
||||
-- Add a new user `a_user'.
|
||||
do
|
||||
a_user.set_id (1)
|
||||
end
|
||||
|
||||
update_user (a_user: CMS_USER)
|
||||
-- Update user `a_user'.
|
||||
do
|
||||
end
|
||||
|
||||
|
||||
feature -- Access: roles and permissions
|
||||
|
||||
user_role_by_id (a_id: like {CMS_USER_ROLE}.id): detachable CMS_USER_ROLE
|
||||
do
|
||||
end
|
||||
|
||||
user_roles_for (a_user: CMS_USER): LIST [CMS_USER_ROLE]
|
||||
-- User roles for user `a_user'.
|
||||
-- Note: anonymous and authenticated roles are not included.
|
||||
do
|
||||
create {ARRAYED_LIST [CMS_USER_ROLE]} Result.make (0)
|
||||
end
|
||||
|
||||
user_roles: LIST [CMS_USER_ROLE]
|
||||
do
|
||||
create {ARRAYED_LIST [CMS_USER_ROLE]} Result.make (0)
|
||||
end
|
||||
|
||||
feature -- Change: roles and permissions
|
||||
|
||||
save_user_role (a_user_role: CMS_USER_ROLE)
|
||||
do
|
||||
end
|
||||
|
||||
|
||||
|
||||
feature -- Logs
|
||||
|
||||
save_log (a_log: CMS_LOG)
|
||||
@@ -115,6 +80,8 @@ feature -- Logs
|
||||
do
|
||||
end
|
||||
|
||||
feature -- Custom
|
||||
|
||||
set_custom_value (a_name: READABLE_STRING_8; a_value: attached like custom_value; a_type: detachable READABLE_STRING_8)
|
||||
-- Save data `a_name:a_value' for type `a_type' (or default if none).
|
||||
do
|
||||
|
||||
Reference in New Issue
Block a user