jerqi commented on code in PR #9018:
URL: https://github.com/apache/gravitino/pull/9018#discussion_r2492596700
##########
api/src/main/java/org/apache/gravitino/authorization/Privileges.java:
##########
@@ -886,4 +887,39 @@ public boolean canBindTo(MetadataObject.Type type) {
return MODEL_SUPPORTED_TYPES.contains(type);
}
}
+
+ /** The privilege to create a tag */
+ public static class CreateTag extends GenericPrivilege<CreateTag> {
+ private static final CreateTag ALLOW_INSTANCE = new
CreateTag(Condition.ALLOW, Name.CREATE_TAG);
+ private static final CreateTag DENY_INSTANCE = new
CreateTag(Condition.DENY, Name.CREATE_TAG);
+
+ /**
+ * Constructor for GenericPrivilege.
+ *
+ * @param condition the condition of the privilege
+ * @param name the name of the privilege
+ */
+ protected CreateTag(Condition condition, Name name) {
+ super(condition, name);
+ }
+
+ /**
+ * @return The instance with allow condition of the privilege.
+ */
+ public static CreateTag allow() {
+ return ALLOW_INSTANCE;
+ }
+
+ /**
+ * @return The instance with deny condition of the privilege.
+ */
+ public static CreateTag deny() {
+ return DENY_INSTANCE;
+ }
+
+ @Override
+ public boolean canBindTo(MetadataObject.Type type) {
+ return true;
Review Comment:
Could the tag and role be tagged?
--
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]