Subject | Grant and Revoke update (field) |
---|---|
Author | Tomáš Beran |
Post date | 2014-04-23T07:40:47Z |
Hello,
I have a problem with permissions. I test this problem on new database.
I have two users (User1 and User2), one table (TEST_TABLE (PKID, NAME, AGE)). I set permission select and update(AGE) to both users. Now everything is all right, but when I revoke permission to USER2, then USER1 has not permission to update fields.
Example:
create table TEST_TABLE (
PKID integer,
NAME varchar(10),
AGE integer,
constraint TEST_PKID primary key (PKID));
commit;
insert into TEST_TABLE values (1, 'TOMAS', 99);
grant select, update(AGE) on TEST_TABLE to USER1, USER2;
--USER1 or USER2:
update TEST_TABLE set AGE = 1;
--now USER1 (and USER2) has update privilege to field AGE
revoke select, update(AGE) on TEST_TABLE from USER2;
--USER1:
update TEST_TABLE set AGE = 1; --no permission to update
Now USER1 has no permission for update/write access to COLUMN TEST_TABLE.AGE
but has permission to select. If I grant update on whole TEST_TABLE then everything all right, but if I set permission on one field,
permissions are wrong.
Firebird v. 2.5.2
Thanks for any advice.
Tomas B.
__________ Information from ESET Mail Security, version of virus signature database 8752 (20130901) __________
The message was checked by ESET Mail Security.
http://www.eset.com
I have a problem with permissions. I test this problem on new database.
I have two users (User1 and User2), one table (TEST_TABLE (PKID, NAME, AGE)). I set permission select and update(AGE) to both users. Now everything is all right, but when I revoke permission to USER2, then USER1 has not permission to update fields.
Example:
create table TEST_TABLE (
PKID integer,
NAME varchar(10),
AGE integer,
constraint TEST_PKID primary key (PKID));
commit;
insert into TEST_TABLE values (1, 'TOMAS', 99);
grant select, update(AGE) on TEST_TABLE to USER1, USER2;
--USER1 or USER2:
update TEST_TABLE set AGE = 1;
--now USER1 (and USER2) has update privilege to field AGE
revoke select, update(AGE) on TEST_TABLE from USER2;
--USER1:
update TEST_TABLE set AGE = 1; --no permission to update
Now USER1 has no permission for update/write access to COLUMN TEST_TABLE.AGE
but has permission to select. If I grant update on whole TEST_TABLE then everything all right, but if I set permission on one field,
permissions are wrong.
Firebird v. 2.5.2
Thanks for any advice.
Tomas B.
__________ Information from ESET Mail Security, version of virus signature database 8752 (20130901) __________
The message was checked by ESET Mail Security.
http://www.eset.com