Updated Admin Module, show Admin in the navigation

iff the current user is administrator.
This commit is contained in:
jvelilla
2015-07-30 12:59:10 -03:00
parent 1ef4025caa
commit 0fe9018ce9
2 changed files with 11 additions and 3 deletions

View File

@@ -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

View File

@@ -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