ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Using restricted access areas

November 06, 2008 9:27am

Subscribe [2]
  • #1 / Nov 06, 2008 9:27am

    Tim Smith

    15 posts

    I’m trying to put together a site with a clients only section. I figured on having a template group “restricted” containing the various templates to be used and using the template access to allow access to logged in users from a particular group.

    What I’d like to do is build a post login page that shows links to areas of the restricted site the member has access to, but can’t figure out how to do this dynamically.

  • #2 / Nov 06, 2008 10:09am

    Robin Sowell

    13255 posts

    It sounds like global conditionals would work for what you want them to do.  Grant everyone (or everyone logged in) access, but vary what links show using {if group_id == "6"}Show linkage{/if} type conditionals.

    Make sense?

  • #3 / Nov 06, 2008 10:28am

    Mark Bowen

    12637 posts

    Or better still maybe the

    Template Access Restrictions 😉

    Hope that helps a bit.

    Best wishes,

    Mark

  • #4 / Nov 06, 2008 10:47am

    Tim Smith

    15 posts

    Thanks for your help.

    We are using the template access restrictions already, the issue is on creating links to the permitted areas.

    Using the conditionals could work, but I was really after a way of generating the links dynamically from the template access restrictions themselves as that would remove future maintenance issues.

  • #5 / Nov 06, 2008 10:54am

    Mark Bowen

    12637 posts

    Ah I see what you mean now. 😉

    Don’t know if perhaps you could perform a SQL query on the database to find out what groups have access to what templates perhaps and do things that way.

    Myself I would probably just create templates with the links in for each group and then use conditionals to embed the certain template depending on which group they are logged-in under. If there are lots of links then perhaps you could create a weblog to hold the links and which group(s) are allowed to access them and spit them out that way?

    Best wishes,

    Mark

  • #6 / Nov 06, 2008 11:38am

    Tim Smith

    15 posts

    Had a look at the database and it stores the groups that are not allowed access to a given template.

    Unfortunately this means it does not fail safe - i.e. when creating a new member group that member group then has access to all templates until they are specifically re-edited to block access from the new group.

    I did find this page http://expressionengine.com/wiki/Redirect_after_login/ about making an extranet which sounded relevant, but the site mentioned no longer exists.


    So I guess that does in fact leave me with creating the access manually as you have suggested or perhaps using http://leevigraham.com/cms-customisation/expressionengine/lg-access-restrict-to/

  • #7 / Nov 06, 2008 11:40am

    Tim Smith

    15 posts

    Actually you (Mark) also posted a related idea here http://ellislab.com/forums/viewthread/89761/, but I didn’t quite follow the logic.

  • #8 / Nov 06, 2008 1:08pm

    Robin Sowell

    13255 posts

    I think the query approach would be the only way to go, and that could be tricky as far as getting it exactly right.  Doable, but it would take some custom code.  We could shift to ‘How to’ for brainstorming if you want to bounce around ideas?

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases