Commit c85bae64 authored by eicom's avatar eicom

- added Admin menu

parent b2dff888
......@@ -20,3 +20,48 @@
alter table im_costs
add ubl_exported_p char(1) default 'f';
-----------------------------------------------------------
-- Create a menu entry
-----------------------------------------------------------
create or replace function inline_0 ()
returns integer as '
declare
v_admins integer;
v_main_menu integer;
v_menu integer;
BEGIN
select group_id into v_admins from groups where group_name = ''P/O Admins'';
-- Determine the main menu. "Label" is used to identify menus.
select menu_id into v_main_menu
from im_menus where label=''admin'';
-- Create the menu.
v_menu := im_menu__new (
null, -- p_menu_id
''acs_object'', -- object_type
now(), -- creation_date
null, -- creation_user
null, -- creation_ip
null, -- context_id
''intranet-ubl'', -- package_name
''admin_ubl'', -- label
''UBL'', -- name
''/intranet-ubl/index'', -- url
10, -- sort_order
v_main_menu, -- parent_menu_id
null -- p_visible_tcl
);
-- Grant read permissions to most of the system
PERFORM acs_permission__grant_permission(v_menu, v_admins, ''read'');
return 0;
end;' language 'plpgsql';
select inline_0 ();
drop function inline_0 ();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment