Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No permission for Usage access to GENERATOR [CORE5531] #5799

Closed
firebird-automations opened this issue May 4, 2017 · 10 comments
Closed

No permission for Usage access to GENERATOR [CORE5531] #5799

firebird-automations opened this issue May 4, 2017 · 10 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Harmenil (karim)

Attachments:
ZOO.FDB

I have a Database with the table EMPLOYE, a
I add to the role "AUTRE" the access to the table "EMPLOYE" (SELECT, UPDATE, INSERT, DELETE)
When I want to INSERT with the "AUTRE", I am locked with the message 'no permission for USAGE access to GENERATOR GEN_EMPLOYE_ID'
Is that normal?
I didn't have the problem in the version 2.5.7
I have found nothing about it except the grants:
GRANT USAGE ON SEQUENCE GEN_EMPLOYE_ID TO AUTRE;
GRANT USAGE ON EXCEPTION EMPLOYEX TO AUTRE;

What can I do to have a repercussion of the privileges?

@firebird-automations
Copy link
Collaborator Author

Commented by: @dyemanov

GRANT USAGE ON SEQUENCE GEN_EMPLOYE_ID TO ROLE AUTRE
?

@firebird-automations
Copy link
Collaborator Author

Modified by: Harmenil (karim)

priority: Major [ 3 ] => Blocker [ 1 ]

description: I have a Database with the table EMPLOYE, a
I add to the role "AUTRE" the access to the table "EMPLOYE" (SELECT, UPDATE, INSERT, DELETE)
When I want to INSERT with the "AUTRE", I am locked with the message 'no permission for USAGE access to GENERATOR GEN_EMPLOYE_ID'
Is that normal?
I didn't have the problem in the version 2.5.7
I have found nothing about it except the grants:
GRANT USAGE ON SEQUENCE GEN_EMPLOYE_ID TO POWERUSER;
GRANT USAGE ON EXCEPTIONE MPLOYE TO POWERUSER;

What can I do to have a repercussion of the privileges?

=>

I have a Database with the table EMPLOYE, a
I add to the role "AUTRE" the access to the table "EMPLOYE" (SELECT, UPDATE, INSERT, DELETE)
When I want to INSERT with the "AUTRE", I am locked with the message 'no permission for USAGE access to GENERATOR GEN_EMPLOYE_ID'
Is that normal?
I didn't have the problem in the version 2.5.7
I have found nothing about it except the grants:
GRANT USAGE ON SEQUENCE GEN_EMPLOYE_ID TO AUTRE;
GRANT USAGE ON EXCEPTION EMPLOYEX TO AUTRE;

What can I do to have a repercussion of the privileges?

@firebird-automations
Copy link
Collaborator Author

Commented by: Harmenil (karim)

GEN_EMPLOYE_ID is the generator for the table EMPLOYE
AUTRE is a created role

@firebird-automations
Copy link
Collaborator Author

Commented by: Harmenil (karim)

The database is this kind

@firebird-automations
Copy link
Collaborator Author

Modified by: Harmenil (karim)

Attachment: ZOO.FDB [ 13110 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @AlexPeshkoff

Take one more look at waht Dmitry wrote:

localhost bin #⁠ ./isql -user toto ZOO.FDB -role AUTRE
Database: ZOO.FDB, User: TOTO
SQL> insert into EMPLOYE(CODE_EMP,L_FR_EMP) values('a', 'b');
Statement failed, SQLSTATE = 28000
no permission for USAGE access to GENERATOR GEN_EMPLOYE_ID
SQL>

localhost bin #⁠ ./isql ZOO.FDB
Database: ZOO.FDB, User: SYSDBA
SQL> GRANT USAGE ON SEQUENCE GEN_EMPLOYE_ID TO ROLE AUTRE ;
SQL>

localhost bin #⁠ ./isql -user toto ZOO.FDB -role AUTRE
Database: ZOO.FDB, User: TOTO, Role: AUTRE
SQL> insert into EMPLOYE(CODE_EMP,L_FR_EMP) values('a', 'b');
SQL>

@firebird-automations
Copy link
Collaborator Author

Modified by: @AlexPeshkoff

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Won't Fix [ 2 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: Harmenil (karim)

Tanks Alexander, but I already had this,
I wonder if there would be an other solution, a better one than adding for each generator (and other object) related to the tables the permission
If anyone have this solution

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

status: Resolved [ 5 ] => Closed [ 6 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @mrotteveel

This comment may be a bit late, but wouldn't it be better to grant the usage permission to the trigger instead of to the role or user?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant