Multiple error in REVOKE operator
---------------------------------

                 Key: CORE-5804
                 URL: http://tracker.firebirdsql.org/browse/CORE-5804
             Project: Firebird Core
          Issue Type: Bug
    Affects Versions: 4.0 Alpha 1
         Environment: All platforms
            Reporter: Roman Simakov


A logic of rvoking options, especially for field permissions is very 
complicated and wrong. Several examples:
================EXAMPLE 1====================
grant update(f1, f2) on table t to u with grant option;
commit;show grants;

/* Grant permissions for this database */
GRANT UPDATE (F1) ON T TO USER U WITH GRANT OPTION
GRANT UPDATE (F2) ON T TO USER U WITH GRANT OPTION

revoke grant option for update on table t from u;
commit;show grants;

/* Grant permissions for this database */
GRANT UPDATE (F2) ON T TO USER U

But should be:

/* Grant permissions for this database */
GRANT UPDATE (F1) ON T TO USER U
GRANT UPDATE (F2) ON T TO USER U

================EXAMPLE 2====================
grant update(f1, f2) on table t to u with grant option;
commit;show grants;

/* Grant permissions for this database */
GRANT UPDATE (F1) ON T TO USER U WITH GRANT OPTION
GRANT UPDATE (F2) ON T TO USER U WITH GRANT OPTION

revoke grant option for update(f1) on table t from u;
commit;show grants;

/* Grant permissions for this database */
GRANT UPDATE ON T TO USER U
GRANT UPDATE (F2) ON T TO USER U WITH GRANT OPTION

But should be

/* Grant permissions for this database */
GRANT UPDATE (F1) ON T TO USER U
GRANT UPDATE (F2) ON T TO USER U WITH GRANT OPTION

=====================EXAMPLE 3================
grant default r1 to role r2;
commit; show grants;

/* Grant permissions for this database */
GRANT DEFAULT R1 TO R2

revoke default r1 from role r2;-- revoke only default option
commit; show grants;

/* Grant permissions for this database */
GRANT DEFAULT R1 TO R2

But should be:

/* Grant permissions for this database */
GRANT R1 TO R2

ETC.

It's necessary to fix a logic and make a code more readable in this place.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to