Using DNN Permissions for items

Sep 2, 2014 at 7:13 PM
Not sure if there was already a discussion about this, but it would be useful if we could set DNN permissions on each item.

For example, I have a rotating slider with 9 slides. And I don't want to show them all all of the time. So I can 'unpublish' a slide, but it would be useful to just use DNN permissions on that specific slide.

This would be especially useful in situations where I only want to show items for users in a role.
Sep 2, 2014 at 8:14 PM
You could fake this now

make a role entity
fill it with all the roles in the portal

now add this to your slide content item

and in your for each code you do a check if the currently logged in user is in the role of the one you have defined for you slide

Armand
Sep 2, 2014 at 8:18 PM
Neat. Thanks :)
Sep 2, 2014 at 8:35 PM
should you make this before me post a code sample :)
Sep 2, 2014 at 8:37 PM
I currently don't have a use but I imagine I will in the future. When I have more time (and a use case) I'll give it a try.
Coordinator
Sep 3, 2014 at 6:50 AM
I also think in this case it's easier to just do it in your template code.

Reason: item based security is a huge performance killer - and poses many challenges.

One example: if a user is allowed to see the Product X, which has a related entity Manufacturer Y (which he is not allowed to see) - how will the template process the data?

And in general: checking every item if the current user may actually see it - for each request, and then going both through groups and people permissions (for each entity) causes a LOT of overhead.

So ATM it's not even in the queue. Especially because it's easy to do yourself if you do have a specific requirement.

Thanks,
Daniel