We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 12410
    • 353 Posts
    Hi Guys,
    I'd like to be able to grant specific users access to view and edit specific containers and resources in the resource tree and assume the best way is to separate out sections of the website with contexts eg On my website I like the librarian just to see the library container and just edit that in the manager and so on
    Is it best if I just set a context called library which contains the library resources and grant them access just to that context? If so what context settings should i set?

    Using these values point back to my homepage:

    http_host  |  www.site.com
    site_url  |  http://www.site.com
    base_url  |  /
    
    site_start  |  6


    so yhe content of my resource doesnt render on the front end.

    web
    /resource1
    /resource2.
    .
    .
    library
    /resource 3 <====How do i successfully view this resource without redirecting back to homepage?
    


    I'd like to access the resource3 url using domain.tld/context/resource so in my case www.site.com/library/resource3

    Thanks


    [ed. note: howster last edited this post 12 years, 4 months ago.]
      • 3749
      • 24,544 Posts
      I would advise against using Contexts for this. Contexts come with a set of issues that are best avoided if you don't need Contexts, and I don't think you do.

      Rather than Contexts, you can put the users in User Groups, the Resources in Resource Groups, and protect groups of resources by creating Resource Group Access ACL entries in Security -> Access Controls.

      If you hide a container this way, it's children will also be hidden.

      See the MODX -> Security Permissions section here for more information: http://bobsguides.com/
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 12410
        • 353 Posts
        Thanks Bob, I just watched http://vimeo.com/13856994 and it's helped quite a bit.

        Long-winded question...Say my tree is


        web
        >medical-department
        >science-department
        >arts department

        ...I want to assign 1 editor (medical editor) just to 'medical-department' and 1 editor (science editor) just to 'science-department' such that each dept can have its own unique admin and just see resources in their corresponding container. Say my user groups and roles are

        Admin 0
        Main Editor 1
        Medical Editor 10

        ...if I assign the container 'medical-department' to the resource group 'medical-department' then only users in the 'Medical Editor' User and Administrator group can see the container in the resource tree. 'Main Editor' users cant see the container strangely.

        Users assigned to Main Editor with a higher role authority of 1 no longer see the 'medical-department' container in the tree. I thought they would see the container like Administrator does? It appears I have to specifically add resource group access to the 'medical-department' resource group back to Main Editor even though Main Editor has greater authority than Medical Editor? How can Administrator see the container so.

        I'm perplexed?
        Thanks!!!!







        [ed. note: howster last edited this post 12 years, 4 months ago.]
          • 12410
          • 353 Posts
          Ok finally the penny dropped. If its helps others see attached. Basically transfer all the resources and containers in the tree across into different resource groups eg Recreation can only edit recreation, guidance can only edit guidance and Primary Editors can edit the lot now.
            • 3749
            • 24,544 Posts
            There is also this video of yours truly (it's almost an hour long, though): http://vimeo.com/54360208
              Did I help you? Buy me a beer
              Get my Book: MODX:The Official Guide
              MODX info for everyone: http://bobsguides.com/modx.html
              My MODX Extras
              Bob's Guides is now hosted at A2 MODX Hosting
              • 12410
              • 353 Posts
              Ok thanks bob! smiley
                • 12410
                • 353 Posts
                Hi,
                Can I give a user access to 1 resource that lies in a container? It appears I can only give access to a resource or container in the root and not a level down? In the below can I give access to just resource2?

                eg

                web
                >container
                >>resource1
                >>resource2

                Thanks
                  • 3749
                  • 24,544 Posts
                  Yes. Just create a new resource group and add that resource to it, then connect that resource group to the user's user group (you'll probably need a new user group for this too) with a Resource Group Access ACL entry.

                  Both users and resources, BTW, can belong to more than one group.

                  If the parent is protected, you'll also have to create a similar connection for it (and any protected ancestors), but with a policy of Load, List, and View, otherwise the user won't be able to see the child resource.
                    Did I help you? Buy me a beer
                    Get my Book: MODX:The Official Guide
                    MODX info for everyone: http://bobsguides.com/modx.html
                    My MODX Extras
                    Bob's Guides is now hosted at A2 MODX Hosting
                    • 12410
                    • 353 Posts
                    Thanks ... I just need to see a child resource with out seeing all its parent items.
                    So I just want to access resource2 in the example above and not see 'container' or 'resource1'. I may also want to see child containers.

                    container/parent
                    >resource1
                    >resource2
                    .........>>childcontainer/parent
                    .........>>resource3

                    >resource4 [ed. note: howster last edited this post 12 years, 4 months ago.]
                      • 3749
                      • 24,544 Posts
                      I'm not sure that's possible (if I'm understanding you). Generally, you have to see the parent to see the child. It might work, however to give the user the Load, List, and View policy for the parent, then clear its show_in_tree field. I've never tried it.
                        Did I help you? Buy me a beer
                        Get my Book: MODX:The Official Guide
                        MODX info for everyone: http://bobsguides.com/modx.html
                        My MODX Extras
                        Bob's Guides is now hosted at A2 MODX Hosting