File tree Expand file tree Collapse file tree 2 files changed +19
-11
lines changed
src/main/java/io/weaviate/client/v1/rbac/model Expand file tree Collapse file tree 2 files changed +19
-11
lines changed Original file line number Diff line number Diff line change 2424interface RbacAction {
2525 String getValue ();
2626
27+ /**
28+ * Returns true if the action is hard deprecated.
29+ *
30+ * <p>
31+ * Override default return for a deprecated enum value like so:
32+ *
33+ * <pre>{@code
34+ * OLD_ACTION("old_action") {
35+ * @Override
36+ * public boolean isDeprecated() { return true; }
37+ * };
38+ * }</pre>
39+ */
2740 default boolean isDeprecated () {
2841 return false ;
2942 }
Original file line number Diff line number Diff line change @@ -45,20 +45,15 @@ public enum Action implements RbacAction {
4545 * and should only be used internally to read legacy permissions.
4646 */
4747 @ Deprecated
48- MANAGE ("manage_roles" , true );
49-
50- Action (String value ) {
51- this (value , false );
52- }
48+ MANAGE ("manage_roles" ) {
49+ @ Override
50+ public boolean isDeprecated () {
51+ return true ;
52+ };
53+ };
5354
5455 @ Getter
5556 private final String value ;
56-
57- private final boolean deprecated ;
58-
59- public boolean isDeprecated () {
60- return deprecated ;
61- }
6257 }
6358
6459 public enum Scope {
You can’t perform that action at this time.
0 commit comments