|
|
|
|
Re: Employee Access / Authority [message #503010 is a reply to message #502995] |
Tue, 12 April 2011 04:21 |
|
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
Regarding a table you posted, perhaps you could create a function (which would then be called from every button):function check_privileges(par_emp_id in number, par_app_id in number)
return boolean
is
l_var number;
begin
select null
into l_var
from your_table
where emp_id = par_emp_id
and app_id = par_app_id;
return (true);
exception
when no_data_found then
return (false);
end;
WHEN-BUTTON-PRESSED on every form button (you should know which form (i.e. APP_ID) it is supposed to call) would then look like this:
-- :THIS_EMP_ID represents current employee
-- 2 is a form whose APP_ID = 2
if check_privileges(:this_emp_id, 2) then
call_form('form_2');
else
message('You are not allowed to run this form');
raise form_trigger_failure;
end if;
|
|
|