You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
C:\MIX\firebird\QA\fbt-repo\tmp>C:\MIX\firebird\fb30\isql localhost/3333:e30
Database: localhost/3333:e30
SQL> create table test(id int, s varchar(10)); commit;
SQL> create or alter user c1234 password '123'; commit;
SQL> revoke all on all from c1234;
Warning: ALL on ALL is not granted to C1234.
SQL> commit;
SQL> grant select on test to c1234; commit;
SQL> grant update (id) on test to c1234; commit;
SQL> insert into test values(1, 'qwerty'); commit;
SQL> connect 'localhost/3333:e30' user 'c1234' password '123';
Database: 'localhost/3333:e30', User: c1234
SQL> show grants;
/* Grant permissions for this database */
GRANT SELECT, UPDATE (ID) ON TEST TO USER C1234 --------------- <<< ::: NB ::: user can modify only ONE column, `ID`.
SQL> select * from test;
ID S
============ ==========
1 qwerty
SQL> update test set s='asdfgh';
SQL> commit;
SQL> select * from test;
ID S
============ ==========
1 asdfgh
Similar actions on WI-V2.5.5.26871:
C:\MIX\firebird\QA\fbt-repo\tmp>C:\MIX\firebird\fb25\bin\isql localhost/3254:e25
Database: localhost/3254:e25
SQL> create table test(id int, s varchar(10)); commit;
SQL> drop user c1234; commit;
SQL> create user c1234 password '123'; commit;
SQL> revoke all on all from c1234;
Warning: ALL on ALL is not granted to C1234.
SQL> commit;
SQL> grant select on test to c1234; commit;
SQL> grant update (id) on test to c1234; commit;
SQL> insert into test values(1, 'qwerty'); commit;
SQL> connect 'localhost/3254:e25' user 'c1234' password '123';
Database: 'localhost/3254:e25', User: c1234
SQL> show grants;
/* Grant permissions for this database */
GRANT SELECT, UPDATE (ID) ON TEST TO USER C1234
SQL> select * from test;
ID S
============ ==========
1 qwerty
SQL> update test set s='asdfgh';
Statement failed, SQLSTATE = 28000
no permission for update/write access to COLUMN TEST.S
Submitted by: @pavel-zotov
New database, on WI-T3.0.0.31840:
C:\MIX\firebird\QA\fbt-repo\tmp>C:\MIX\firebird\fb30\isql localhost/3333:e30
Database: localhost/3333:e30
SQL> create table test(id int, s varchar(10)); commit;
SQL> create or alter user c1234 password '123'; commit;
SQL> revoke all on all from c1234;
Warning: ALL on ALL is not granted to C1234.
SQL> commit;
SQL> grant select on test to c1234; commit;
SQL> grant update (id) on test to c1234; commit;
SQL> insert into test values(1, 'qwerty'); commit;
SQL> connect 'localhost/3333:e30' user 'c1234' password '123';
Database: 'localhost/3333:e30', User: c1234
SQL> show grants;
/* Grant permissions for this database */
GRANT SELECT, UPDATE (ID) ON TEST TO USER C1234 --------------- <<< ::: NB ::: user can modify only ONE column, `ID`.
SQL> select * from test;
============ ==========
1 qwerty
SQL> update test set s='asdfgh';
SQL> commit;
SQL> select * from test;
============ ==========
1 asdfgh
Similar actions on WI-V2.5.5.26871:
C:\MIX\firebird\QA\fbt-repo\tmp>C:\MIX\firebird\fb25\bin\isql localhost/3254:e25
Database: localhost/3254:e25
SQL> create table test(id int, s varchar(10)); commit;
SQL> drop user c1234; commit;
SQL> create user c1234 password '123'; commit;
SQL> revoke all on all from c1234;
Warning: ALL on ALL is not granted to C1234.
SQL> commit;
SQL> grant select on test to c1234; commit;
SQL> grant update (id) on test to c1234; commit;
SQL> insert into test values(1, 'qwerty'); commit;
SQL> connect 'localhost/3254:e25' user 'c1234' password '123';
Database: 'localhost/3254:e25', User: c1234
SQL> show grants;
/* Grant permissions for this database */
GRANT SELECT, UPDATE (ID) ON TEST TO USER C1234
SQL> select * from test;
============ ==========
1 qwerty
SQL> update test set s='asdfgh';
Statement failed, SQLSTATE = 28000
no permission for update/write access to COLUMN TEST.S
Commits: 58bba21 FirebirdSQL/fbt-repository@b36b53c
The text was updated successfully, but these errors were encountered: