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.

Restrict user access to channel categories and some other questions

February 21, 2012 4:10am

Subscribe [2]
  • #1 / Feb 21, 2012 4:10am

    nekorin

    29 posts

    Hi,

    I am kind of stuck with my current project requirements. Currently I am doing a website for a group of properties. The channels for the website are as of the following

    - Static Page
    - News
    - Image Gallery

    For each of the channels, they are categorized based on the property each entry is associated with.

    eg. News Category
    - Property 1
    - Property 2
    - Property 3 and so forth.

    Now as a super-admin I have no problems creating entries in all channels and every property. However, my client will like to assign a content editor for each property, who will manage and edit their own entries without affecting the others or seeing the others.

    Is it possible to restrict viewing/editing/creating using categories rather than channels? The channels for each property are the same and with like 20+ properties(usergroups, 1 usergroup for each property) I would end up with 60+ channels if I assign 3 channels per user group.


    Another question:

    The website has a section which authenticated users can access and download images/media, but not upload or edit. How do I go about creating that? Is there any modules that does that currently or do I need to create my own?

    Regards,
    Rin

  • #2 / Feb 21, 2012 11:08pm

    John St-Amand

    865 posts

    Hi there - I don’t think you can restrict access based on categories, no - not if they’re also shared among groups and channels anyway.

    Would EE’s native settings for a given member group not be able to handle what you’re looking for?  When you set up a member group, under “channel posting privileges” you have the ability to set a group-wide preference of:

    Can view channel entries authored by others    
    Can delete their own channel entries    
    Can edit entries authored by others    
    Can delete channel entries authored by others  
    Can change the author name when posting channel entries

    If you set pretty well all of the above to no, you are essentially applying the restrictions you described, unless I’m misunderstanding.

    You could do it with a relationship field rather than a category. Then you would have all the same restrictions as above available to you for the related channel.  I believe you could handle it that way.  So each “category” would actually be an entry in a channel.  I could see some challenges appearing however for a news item that has to be related to more than one category/entry though.

    With regard to your question about a file download area that they cannot upload to or edit - that would really be something you simply setup with front-end templates with member access only at the template level, for example.  As an example, you could create a channel with your various downloadable files, and then setup a template to display these files with download buttons/links, while making that template accessible only to logged in members of your given member group (found under “access privileges” for a given template.  If you needed to do more, such as securing the folder the files themselves are stored in and hiding the URL of the file itself, I would suggest looking at the Channel Files add-on from DevDemon.  It provides tracking/metrics for the downloads too.

  • #3 / Feb 22, 2012 2:06am

    nekorin

    29 posts

    Hi John,

    Thanks for the reply. I know that we can apply channel posting privileges, but my current project requires me to have content editor accounts for each of the property. Hmm, a better analogy instead of using properties will be a big school website.

    Currently my school website has the following channels, with each channel having its own categories(faculties and departments):

    - Static Page
    - News
    - Image Gallery

    As the school has different faculties and departments, the school has decided to let the web-admins/content editors of each faculty edit their own content but not others.

    eg. The Arts Faculty content editor will be able to edit pages under http://www.school.com/faculty-of-arts/

    If I go by the channel posting privileges, most probably I will need to sub-divide the current channels into ‘sub-channels’, then assign the privileges to the respective user group, like:

    - Static_Page_Arts
    - News_Arts
    - Image_Gallery_Arts
    - Static_Page_Engineering
    - News_Engineering
    - Image_Gallery_Engineering
    - Static_Page_Design
    - News_Design
    - Image_Gallery_Design

    Is there another way to do this? Currently I have like 6 channels and if I create a separate group of channels for each ‘faculty’ I will have around 80+ channels. Another headache for me is that there will be some entries (eg. Inter-faculty news) that will span across a few ‘faculties’.


    Thanks for suggestion on how to do up the download area and the module recommendation, I’ll check it out.

    Regards,
    Rin

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

ExpressionEngine News!

#eecms, #events, #releases