Commit 95e44779 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_cloud: Check if the user has permisson before provide a URL

  Only get the product image if the user has access to it.
parent 1a7d9ab1
......@@ -8,7 +8,9 @@ release = portal.portal_catalog.getResultValue(
url_string=url_string,
)
if release is not None:
software_product = release.getAggregateValue()
software_product = release.getAggregateValue(
checked_permission='Access contents information')
if software_product is not None:
image_url = software_product.getDefaultImageAbsoluteUrl()
return image_url
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment