Updated Admin Module, show Admin in the navigation
iff the current user is administrator.
This commit is contained in:
@@ -19,6 +19,8 @@ inherit
|
||||
|
||||
CMS_HOOK_BLOCK
|
||||
|
||||
CMS_REQUEST_UTIL
|
||||
|
||||
create
|
||||
make
|
||||
|
||||
@@ -120,8 +122,13 @@ feature -- Hooks
|
||||
local
|
||||
lnk: CMS_LOCAL_LINK
|
||||
do
|
||||
create lnk.make ("Admin", "admin")
|
||||
a_menu_system.primary_menu.extend (lnk)
|
||||
if
|
||||
attached current_user (a_response.request) as l_user and then
|
||||
a_response.api.user_api.is_admin_user (l_user)
|
||||
then
|
||||
create lnk.make ("Admin", "admin")
|
||||
a_menu_system.primary_menu.extend (lnk)
|
||||
end
|
||||
end
|
||||
|
||||
note
|
||||
|
||||
@@ -62,7 +62,8 @@ feature -- Process
|
||||
create b.make_empty
|
||||
uid := role_id_path_parameter (request)
|
||||
if uid > 0 and then attached user_api.user_role_by_id (uid.to_integer) as l_role then
|
||||
fixme ("refactor: process_edit, process_create process edit")
|
||||
fixme ("Issues with WSD_FORM_DATA.apply_to_associated_form")
|
||||
-- if we have a WSF_FORM_CHECKBOK_INPUT, cheked inputs, are not preserverd in case of error.
|
||||
if request.path_info.ends_with_general ("/edit") then
|
||||
edit_form (l_role)
|
||||
elseif request.path_info.ends_with_general ("/delete") then
|
||||
|
||||
Reference in New Issue
Block a user