|
-
Security
Given the tables below i need to implement security so that the employee can only VIEW employee details in the same organisational unit. Anyone give me some hints on how to do this. Do i create a new role and do i use the original employee table or create a synonym?
CREATE TABLE employee
(
emp_id NUMBER(6) CONSTRAINT emp_pk PRIMARY KEY,
emp_name VARCHAR2(40) CONSTRAINT emp_name_nn NOT NULL,
emp_hiredate DATE CONSTRAINT emp_hiredate_nn NOT NULL,
ou_id NUMBER(4) CONSTRAINT emp_ou_fk REFERENCES org_unit
);
CREATE TABLE org_unit
(
ou_id NUMBER(4) CONSTRAINT ou_pk PRIMARY KEY,
ou_name VARCHAR2(40) CONSTRAINT ou_name_uq UNIQUE
CONSTRAINT ou_name_nn NOT NULL,
ou_type VARCHAR2(30) CONSTRAINT ou_type_nn NOT NULL,
ou_parent_org_id NUMBER(4) CONSTRAINT ou_parent_org_unit_fk
REFERENCES org_unit
);
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|