You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
message = "The Grant database is immutable. Changing it would require revoking permissions from the old database before granting them in the new one."
26
30
)
31
+
@ValidationRule(
32
+
value = "self.size() > 0",
33
+
message = "The Grant database must not be empty."
34
+
)
27
35
privateStringdatabase = "";
28
36
29
37
/// The name of the role to grant privileges on.
@@ -32,14 +40,21 @@ public class GrantSpec {
32
40
value = "self == oldSelf",
33
41
message = "The Grant role is immutable. Changing it would require revoking permissions from the old role before granting them to the new one."
34
42
)
43
+
@ValidationRule(
44
+
value = "self.size() > 0",
45
+
message = "The Grant role must not be empty."
46
+
)
35
47
privateStringrole = "";
36
48
37
49
/// The database schema to grant privileges on for this role (required except if objectType is "database")
38
-
@Required
39
50
@ValidationRule(
40
51
value = "self == oldSelf",
41
52
message = "The Grant schema is immutable. Changing it would require revoking permissions from the old schema before granting them to objects in the new schema."
42
53
)
54
+
@ValidationRule(
55
+
value = "self.size() > 0",
56
+
message = "The Grant schema must not be empty."
57
+
)
43
58
privateStringschema = "";
44
59
45
60
/// The PostgreSQL object type to grant the privileges on.
@@ -72,7 +87,7 @@ public class GrantSpec {
72
87
privateList<String> objects = newArrayList<>();
73
88
74
89
/// The privileges to grant on the PostgreSQL objects.
75
-
/// The operator also validates if the objectType supports the privileges.
90
+
/// The Operator also validates if the objectType supports the privileges.
Copy file name to clipboardExpand all lines: operator/src/main/java/it/aboutbits/postgresql/crd/role/RoleSpec.java
+5-1Lines changed: 5 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,11 @@ public class RoleSpec {
21
21
@Required
22
22
@ValidationRule(
23
23
value = "self == oldSelf",
24
-
message = "The Role name is immutable. Allowing to rename the Role name using 'alter role <old_name> rename to <new_name>' would add unwanted side-effects to the operator."
24
+
message = "The Role name is immutable. Allowing to rename the Role name using 'alter role <old_name> rename to <new_name>' would add unwanted side-effects to the Operator."
0 commit comments