Message Boards

Liferay 7.3 and Asset Publisher View permission

thumbnail
Andre Kreienbring, modified 3 Years ago.

Liferay 7.3 and Asset Publisher View permission

Regular Member Posts: 152 Join Date: 12/18/06 Recent Posts
My custom asset entities are found by the asset publisher because I implement an AssetRenderer for them.
So far so good. My custom asset is displayed to all user roles including the guest user! And that's what I want. Perfect! :-)
But clicking on the assets name leads to different behavior regarding the role of the user.
There's this method:
    @Override
    public String getJspPath(HttpServletRequest httpServletRequest, String template) {
        logger.debug("[MyEntity]AssetRenderer was called with template " + template);
        
        if (template.equals(TEMPLATE_ABSTRACT) ||
            template.equals(TEMPLATE_FULL_CONTENT)) {
            return "/asset/" + template + ".jsp";
        }
        else {
            return null;
        }
    }


which I implemented.

For Administrators this works fine. The asset is found and full_content or abstract are shown when the Admin clicks on the name. An Admin even gets the EDIT permission.
However everyone not being Admin is presented an empty page when clicking on the asset entry. Which is not what I want :-(
Even Guest should be able to VIEW the asset.

What I've tried so far:
- gave the roles in question VIEW permission on my entity
- gave the roles  in question VIEW permission on Asset publisher
- implemented getUrlView and getUrlViewInContext in my AssetRenderer (never accomplished a working redirect to the 'view.jsp' of the entity...)

What do I need to do to enable a role to view my asset?
thumbnail
Andre Kreienbring, modified 3 Years ago.

RE: Liferay 7.3 and Asset Publisher View permission

Regular Member Posts: 152 Join Date: 12/18/06 Recent Posts
Because I saw the same behavior for the Liferay legacy blogs app I filed an issue for this

https://issues.liferay.com/browse/LPS-122105