You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2022/12/07 13:59:13 UTC

[GitHub] [dubbo] Koooooo-7 commented on a diff in pull request #11076: update(qos): support anonymous access.

Koooooo-7 commented on code in PR #11076:
URL: https://github.com/apache/dubbo/pull/11076#discussion_r1042239809


##########
dubbo-plugin/dubbo-qos/src/main/java/org/apache/dubbo/qos/command/annotation/Cmd.java:
##########
@@ -55,4 +58,57 @@
      * @return command order in help
      */
     int sort() default 0;
+
+    /**
+     * Command required access permission level
+     *
+     * @return command permission level
+     */
+    PermissionLevel requiredPermissionLevel() default PermissionLevel.PROTECTED;
+
+    enum PermissionLevel {
+        /**
+         * the lowest permission level, can access with
+         * anonymousAccessPermissionLevel=PUBLIC / anonymousAccessPermissionLevel=1 or higher
+         */
+        PUBLIC(1),
+        /**
+         * the middle permission level, default permission for each cmd
+         */
+        PROTECTED(2),
+        /**
+         * the highest permission level, suppose only the localhost can access this command
+         */
+        PRIVATE(3),
+
+        /**
+         * It is the reserved default anonymous permission level, can not access any command
+         */
+        NONE(Integer.MIN_VALUE),
+
+        ;
+        private final int level;
+

Review Comment:
   updated.



-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org