Skip to content

Commit 6c436ec

Browse files
authored
server: fix domain shared public template check (#6916)
Fixes #6885 Fixes the incorrect inverted check. Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com> Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
1 parent c8d2776 commit 6c436ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/src/main/java/com/cloud/acl/DomainChecker.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ protected DomainChecker() {
120120
*/
121121

122122
private void checkPublicTemplateAccess(VirtualMachineTemplate template, Account owner, Account caller){
123-
if (!QueryService.SharePublicTemplatesWithOtherDomains.valueIn(owner.getDomainId()) ||
123+
if (QueryService.SharePublicTemplatesWithOtherDomains.valueIn(owner.getDomainId()) ||
124124
caller.getDomainId() == owner.getDomainId() ||
125125
_domainDao.isChildDomain(owner.getDomainId(), caller.getDomainId())) {
126126
return;

0 commit comments

Comments
 (0)