Developer forum

Forum » CMS - Standard features » Paragraph Permissions

Paragraph Permissions

Adrian Ursu
Reply

Hi Guys,

I need to display a paragraph for all visitors (anonymus or registered) except for registered users that are part of a certain group (or Groups).

In theory it looked simple. Set Permissions on module, set All users to allow and the other groups Deny.

For some reason this type of approach does not work. I am using 8.5.1.17 but also tried in 8.6.0.2 and 8.4.1.8 with the same outcome.

Any ideeas? Am I doing something wrong?

Thanks,
Adrian


Replies

 
Nicolai Høeg Pedersen
Reply

Hi Adrian

That is not possible.

The only way to do that, would be in your template to make a conditional that would not render the content if the user is logged in:

<!--@If Defined(Global:Extranet.UserName)-->

 
Adrian Ursu
Reply

Hi Nicolai,

This is the actual solution we ended up using.

But don't you find this "feature" a bit misleading? I would prefer to have to possibility to let the admin use the permissions in an intuitive way and avoid hardcoding the templates for each group rule. 

Thanks,

Adrian

 
Nicolai Høeg Pedersen
Reply

Yes of course.

But when we developed permissions, we did not think of that scenario - you do not have access if you login. But as an unkown user you have....

In assortments we have introduced a virtual "Anonymous" group that visitors are member of if they are not logged in - and if you login you can only see a limited set of products. I guess that would be something similar we should introduce on permissions.

BR Nicolai

 
Adrian Ursu
Reply

I have seen that one. Very nice to see a feature request coming to life :)

Yes, I guess that would do the trick and it might be helpful in other cases as well.

 

You must be logged in to post in the forum