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

Add 'GRANT DATABASE' to rbac #988

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ of the following commands:

| Privilege description | Clause |
| --------------------- | ------ |
| Privilege to [interact with a database](/database-management/multi-tenancy). | `DATABASE` |
| Privilege to [access data](/querying/read-and-modify-data). | `MATCH` |
| Privilege to [modify data](/querying/read-and-modify-data). | `MERGE`, `SET`|
| Privilege to [create](/querying/create-graph-objects) and [delete]](/querying/read-and-modify-data) data. | `CREATE`, `DELETE`, `REMOVE` |
Expand Down Expand Up @@ -310,6 +311,7 @@ To grant all privileges to a superuser (admin):

```
GRANT ALL PRIVILEGES TO admin;
GRANT DATABASE * to admin;
GRANT CREATE_DELETE ON LABELS * TO admin;
GRANT CREATE_DELETE ON EDGE_TYPES * TO admin;
```
Expand Down Expand Up @@ -346,6 +348,7 @@ label. Alice has already created a data analyst role as well as Bob's account in
CREATE ROLE analyst;
CREATE USER Bob IDENTIFIED BY 'test';
SET ROLE FOR Bob TO analyst;
GRANT DATABASE exampledb TO Bob;
```

Unfortunately, when he writes:
Expand Down Expand Up @@ -426,6 +429,7 @@ The administrator has already set up his account with the following commands:
CREATE ROLE tester;
CREATE USER Charlie IDENTIFIED BY 'test';
SET ROLE FOR Charlie TO tester;
GRANT DATABASE exampledb TO Charlie;

GRANT MATCH, SET TO tester;

Expand Down Expand Up @@ -463,6 +467,7 @@ following commands:
CREATE ROLE dataEngineer;
CREATE USER David IDENTIFIED BY 'test';
SET ROLE FOR David TO dataEngineer;
GRANT DATABASE exampledb TO David;

GRANT MATCH, DELETE TO dataEngineer;

Expand Down Expand Up @@ -505,6 +510,7 @@ database administrator therefore sets Eve's role as:
CREATE ROLE seniorEngineer;
CREATE USER Eve IDENTIFIED BY 'test';
SET ROLE FOR Eve TO seniorEngineer;
GRANT DATABASE exampledb TO Eve;

GRANT MATCH, DELETE TO seniorEngineer;

Expand Down