I have one database in Teradata called LDAP_TEST inside of this database I have one table called EMPLOYEE. I have two roles one ldapUser and One ldapAdim. User with role ldapUser can see only 3 columns of a table LDAP_TEST.EMPLOYEE and user with role ldapAdmin can see the whole table. Both user/role belong to same profile TDLDAP.
Now I created another table manager inside of same database LDAP_TEST.
CREATE TABLE LDAP_TEST.manager
(
Manager_ID VARCHAR(50),
Manager_NAME VARCHAR (50),
DEPT_ID INTEGER,
POSITION_ VARCHAR (50),
SALARY INTEGER
);
I create another role called HR_Manager. This role should be able to see the 4 columns of the table LDAP_TEST.manages. There for I created a view called manager_view like that
CREATE VIEW LDAP_TEST.manager_view AS SELECT Manager_ID, Manager_NAME, DEPT_ID, POSITION_ FROM LDAP_TEST.manager;
I also want to allow users with role ldapUser to see the first three columns of manager table so I created another view like
CREATE VIEW LDAP_TEST.User_view AS SELECT Manager_ID, Manager_NAME, DEPT_ID FROM LDAP_TEST.manager;
Finally I grant the views to specific role as GRANT SELECT ON LDAP_TEST.User_view TO ldapUser
and GRANT SELECT ON LDAP_TEST.manager_view TO HR_Manager;
Problem: Problem starts when I create a user and assign a role HR_Manager the user can see the specific columns of the table which is good but the user with role ldapUser and ldapAdmin can see the full table of managers. It is very strange behavior and I am not able to see my mistake here.
What I have done to resolve this issue: I tried to revoke the access to a table like
REVOKE SELECT ON LDAP_TEST.manager TO ldapUser;
Result is same, users still can see the whole table. Caqn you please tell me what cause this issue and How to resolve it? Kind regards,