sureshanaparti commented on a change in pull request #5846:
URL: https://github.com/apache/cloudstack/pull/5846#discussion_r783660353
##########
File path:
engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade41520to41600.java
##########
@@ -65,6 +70,28 @@ public boolean supportsRollingUpgrade() {
@Override
public void performDataMigration(Connection conn) {
generateUuidForExistingSshKeyPairs(conn);
+ generateAnnotationPermissions(conn);
+ }
+
+ private void generateAnnotationPermissions(Connection conn) {
+ List<String> annotationRules = Arrays.asList("listAnnotations",
"addAnnotation", "removeAnnotation");
+ for (RoleType roleType : Arrays.asList(RoleType.ResourceAdmin,
RoleType.DomainAdmin, RoleType.User)) {
+ checkAnnotationPermissionExists(conn, roleType, annotationRules);
+ }
+ }
+
+ private void checkAnnotationPermissionExists(Connection conn, RoleType
roleType, List<String> rules) {
Review comment:
```suggestion
private void checkAndPersistAnnotationPermissions(Connection conn,
RoleType roleType, List<String> rules) {
```
--
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]