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.

Best way to do this?

March 09, 2011 11:06am

Subscribe [1]
  • #1 / Mar 09, 2011 11:06am

    BiteCP

    2 posts

    Hello,

    We’ve got a very custom project that I’m struggling to work out the best way to structure. Basically:

    - There’s any number of ‘sections’ to the website (boroughs). Each of these sections need to have different content. These boroughs need to be editable, so I’m thinking of using categories or a custom field populated from another channel.
    - Each ‘section’ then has three subsections (pupils, parents, teachers), each of which has it’s own unique content. My plan here is to use three “body” fields within each page, then pull the correct field in depending on the subsection.

    The subsections then each have an area of the site that needs to be editable by a specific user group (we’ll call them admins). These pages are not predefined, so a Super admin could add/edit/delete these pages. Admins might only be able to edit a specific page, or all pages within said section. This is the main issue as I’m not sure how to limit access to these pages without using a unique channel for each page.

    This is a tough one to explain, so please let me know if you need anything clarified.

    Thanks,
    Tom

  • #2 / Mar 09, 2011 9:36pm

    Cheif

    626 posts

    Can you show a simple nav structure ie.

    > Home
    > Boroughs - mysite.com/boroughs lists all the boroughs
    -> Borough XX - Could be hundreds at top level
    —> School X
    —-> Pupil - Only super admin can edit
    —-> Teacher - Teachers need to edit their own but not others
    —-> Parent - Parents are strange !!
    —> School X
    —-> Pupil - Only super admin can edit
    —-> Teacher - Teachers need to edit their own but not others
    —-> Parent - Parents are strange !!


    etc. or something a bit more visual

  • #3 / Mar 10, 2011 6:05am

    BiteCP

    2 posts

    Hi Cheif,

    Thanks for your reply. I’ve given an example below of the navigation structure.

    Home
    |-Hackney [Borough, could be 1-100]
      |-Pupils [All pages in this section are only editable by superadmins]
      |-Page 1
      |-Page 2
        |-Subpage 1
        |-Subpage 2
      |-Teachers
      |-Page 1 [Editable by superadmins]
      |-Editable section [all pages editable by second level admins assigned to this borough]
        |-Subpage 1
        |-Subpage 2 [specific page editable by third level admins assigned to this borough and page only]
       
    I’ve been thinking about the best way to handle this. I could use Categories for the boroughs, although an entry will only ever exist in one borough. I’ve been trying to find a suitable extension that limits access to specific entries for members. The closest I’ve found is Entry Permissions, but it’s EE 1 only and seems to only limit access to member groups, not specific members.

    http://devot-ee.com/add-ons/entry-permissions/

    I should also note that I’m planning on using the Structure plugin.

    Any ideas?

    EDIT: Some formatting is being stripped out above. Pupils and Teachers are parent pages of ‘Page 1’ etc

  • #4 / Mar 11, 2011 12:04am

    Cheif

    626 posts

    Geez, I’d proably be inclined to look at SafeCracker/SAEF - take the editing options out of the back end and create conditionals on a template so

    {if member_group == "1"}
    //show edit button which links to /templategroup/edit_template/
    {/if}
    //Then on edit_template
    {if member_group =="1"} // test again just in case
    //display SafeCracker Form
    {if:else}
    Go away, you're not authorised
    {/if}

    This would be quicker to develop IMHO as the backend restrictions for editing etc are good but not really fine grain enough for your needs. This still doesnt take in to account personal ID, meaning a level_1 admin could edit any entry at their level, level_2..any at their level etc

    We are developing a similar approach for a community project where we have 2 channels. 1 Business Owners and Businesses. Using “User” from Solspace we can assign Owners to one or multiple business and then test {is_author} to allow editing. Works great for individual users but not groups of users :(

  • #5 / Mar 11, 2011 5:24am

    BiteCP

    2 posts

    Cheif,

    I actually found an old post from you about SafeCracker and a similar spec’d project that had pointed me in the right direction. This is the route I’d decided on so I’m glad you’ve clarified it.

    Thanks very much for your help pal, I really appreciate it. No doubt I’ll update this post with any new problems in a few days!

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

ExpressionEngine News!

#eecms, #events, #releases