Timeline for How to restrict access to content based on roles (multiple levels) and show a public preview?
Current License: CC BY-SA 3.0
7 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jan 31, 2013 at 20:53 | comment | added | Renee | Agreed it doesn't feel elegant, but it's not so inelegant, really: the interface makes it seem like a bit deal, but from a back-end standpoint it's a few if-else statements, basically, before execution of a single variant's display. Doing it with Panels also allows non-PHP-experts to adjust things later, and nine isn't so huge. Just install Authcache and you're good to go ;) | |
| Jul 26, 2012 at 12:35 | comment | added | mpdonadio♦ | Complicated problems need complex solutions. I don't think nine variants is a problem at all; we frequently have lots of variants for panel pages. Implementing as a PHP rule may make it easier to fine tune, though. | |
| Jul 26, 2012 at 9:21 | comment | added | Letharion | +1. Perhaps it would make sense to implement the access rule for yourself, allowing you PHP, without eval(). See (drupal.stackexchange.com/questions/33336/…) for some help getting started. | |
| Jul 26, 2012 at 8:37 | comment | added | arjan | I looked some further into how this coud work with Panels, but I have my doubts (see update above). Thoughts? | |
| Jun 15, 2012 at 14:17 | comment | added | mpdonadio♦ | OK, I think I better understand what you are trying to do. Yeah, I think I would make a Level taxonomy, assign these to the nodes, and still tackle the display with Panels. I think you would then need a variant for each term, and the selection rule would be a OR of the levels going up. | |
| Jun 15, 2012 at 14:10 | comment | added | arjan | How would you mark the access level each node requires - taxonomy? It's not just an anonymous vs registered distinction, but e.g. node 1 visible for level 1 role, node 2 for level 2, etc. There are at least 4 roles + anonymous, so that would be 5 selection rules. Is Panels still a good fit for this case? | |
| Jun 15, 2012 at 11:38 | history | answered | mpdonadio♦ | CC BY-SA 3.0 |