Database Reference
In-Depth Information
7.
Let's create
anotherkeyspace
and a privileges table under it with the
name
privileges
:
// create keyspace.
create keyspace anotherkeyspace with
replication = { 'class' : 'SimpleStrategy' ,
'replication_factor' : 3};
// create table.
create table privileges (user_id text PRIMARY
KEY, read_write boolean);
8.
Let's grant all permissions on the
privileges
table to
normaluser
:
grant all on table anotherkeyspace.privileges
to normaluser;
9.
// list all permissions.
list all permissions of normaluser;
Figure 4-12
.
The new list of permissions for normaluser
10.
Next, let's grant all permissions on all keyspaces to
superuser
:
grant select on all keyspaces to 'superuser';