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
Copy file name to clipboardExpand all lines: server/src/com/cloud/template/TemplateManagerImpl.java
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1324,6 +1324,11 @@ public boolean updateTemplateOrIsoPermissions(BaseUpdateTemplateOrIsoPermissions
1324
1324
thrownewInvalidParameterValueException("Update template permissions is an invalid operation on template " + template.getName());
1325
1325
}
1326
1326
1327
+
//Only admin or owner of the template should be able to change its permissions
1328
+
if (caller.getId() != ownerId && !isAdmin) {
1329
+
thrownewInvalidParameterValueException("Unable to grant permission to account " + caller.getAccountName() + " as it is neither admin nor owner or the template");
0 commit comments