jerryshao commented on code in PR #4141:
URL: https://github.com/apache/gravitino/pull/4141#discussion_r1683714122


##########
api/src/main/java/org/apache/gravitino/authorization/Privilege.java:
##########
@@ -43,66 +43,52 @@ public interface Privilege {
   enum Name {
     /** The privilege to create a catalog. */
     CREATE_CATALOG(0L, 1L),
-    /** The privilege to drop a catalog. */
-    DROP_CATALOG(0L, 1L << 1),
-    /** The privilege to alter a catalog. */
-    ALTER_CATALOG(0L, 1L << 2),
     /** The privilege to use a catalog. */
-    USE_CATALOG(0L, 1L << 3),
+    USE_CATALOG(0L, 1L << 2),
     /** The privilege to create a schema. */
-    CREATE_SCHEMA(0L, 1L << 4),
-    /** The privilege to drop a schema. */
-    DROP_SCHEMA(0L, 1L << 5),
-    /** The privilege to alter a schema. */
-    ALTER_SCHEMA(0L, 1L << 6),
+    CREATE_SCHEMA(0L, 1L << 3),
     /** the privilege to use a schema. */
-    USE_SCHEMA(0L, 1L << 7),
+    USE_SCHEMA(0L, 1L << 4),
     /** The privilege to create a table. */
-    CREATE_TABLE(0L, 1L << 8),
-    /** The privilege to drop a table. */
-    DROP_TABLE(0L, 1L << 9),
+    CREATE_TABLE(0L, 1L << 5),
     /** The privilege to write a table. */
-    WRITE_TABLE(0L, 1L << 10),
+    MODIFY_TABLE(0L, 1L << 6),

Review Comment:
   This privilege can delete a table, as we discussed that only the owner can 
delete a table?



##########
api/src/main/java/org/apache/gravitino/authorization/Privilege.java:
##########
@@ -43,66 +43,52 @@ public interface Privilege {
   enum Name {
     /** The privilege to create a catalog. */
     CREATE_CATALOG(0L, 1L),
-    /** The privilege to drop a catalog. */
-    DROP_CATALOG(0L, 1L << 1),
-    /** The privilege to alter a catalog. */
-    ALTER_CATALOG(0L, 1L << 2),
     /** The privilege to use a catalog. */
-    USE_CATALOG(0L, 1L << 3),
+    USE_CATALOG(0L, 1L << 2),
     /** The privilege to create a schema. */
-    CREATE_SCHEMA(0L, 1L << 4),
-    /** The privilege to drop a schema. */
-    DROP_SCHEMA(0L, 1L << 5),
-    /** The privilege to alter a schema. */
-    ALTER_SCHEMA(0L, 1L << 6),
+    CREATE_SCHEMA(0L, 1L << 3),
     /** the privilege to use a schema. */
-    USE_SCHEMA(0L, 1L << 7),
+    USE_SCHEMA(0L, 1L << 4),
     /** The privilege to create a table. */
-    CREATE_TABLE(0L, 1L << 8),
-    /** The privilege to drop a table. */
-    DROP_TABLE(0L, 1L << 9),
-    /** The privilege to write a table. */
-    WRITE_TABLE(0L, 1L << 10),
-    /** The privilege to read a table. */
-    READ_TABLE(0L, 1L << 11),
+    CREATE_TABLE(0L, 1L << 5),
+    /** The privilege to alter, insert, update, or delete a table. */
+    MODIFY_TABLE(0L, 1L << 6),
+    /** The privilege to select data from a table. */
+    SELECT_TABLE(0L, 1L << 7),
     /** The privilege to create a fileset. */
-    CREATE_FILESET(0L, 1L << 12),
-    /** The privilege to drop a fileset. */
-    DROP_FILESET(0L, 1L << 13),
+    CREATE_FILESET(0L, 1L << 8),
     /** The privilege to write a fileset. */
-    WRITE_FILESET(0L, 1L << 14),
+    WRITE_FILESET(0L, 1L << 9),
     /** The privilege to read a fileset. */
-    READ_FILESET(0L, 1L << 15),
+    READ_FILESET(0L, 1L << 10),
     /** The privilege to create a topic. */
-    CREATE_TOPIC(0L, 1L << 16),
-    /** The privilege to drop a topic. */
-    DROP_TOPIC(0L, 1L << 17),
-    /** The privilege to write a topic. */
-    WRITE_TOPIC(0L, 1L << 18),
-    /** The privilege to read a topic. */
-    READ_TOPIC(0L, 1L << 19),
+    CREATE_TOPIC(0L, 1L << 11),
+    /** The privilege to produce a topic. */

Review Comment:
   "to produce to a topic" and "to consume from a topic".



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to