We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28582
    • 20 Posts
    I have a site in development that uses Articles for its blog/news. I have created a user and want to let them have access to edit Articles and NOT the rest of the site resources ie pages.

    I tried disabling "save_document" in access policy but this also affects the articles section so you can only view the resource.

    Any help would be appreciated, thanks Stewart
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      You need to create a user group and resource group for the Articles resources and the users you want to edit them.

      The rest of the resources have to be added to a group associated with a user group that your Articles editors do not belong to.

      Resources that belong to no group, or to a group that has no associated user group, are available for everyone.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 3749
        • 24,544 Posts
        To allow them to edit only the articles pages, you need to protect *all* the resources of the site by putting them in a Resource Group and connecting that Resource Group to the Administrator User Group (which the user in question is *not* a member of) using a Resource Group Access ACL entry.

        At that point, the user will have no access to anything. Then put the Articles in a Resource Group and connect that Resource Group to the user's User Group with another Resource Group Access ACL entry. That will give them access to the Articles.

        The DefaultResource Group plugin is handy for putting all new pages in the restricted group. It could easily be modified to also put any new Articles in the Articles resource group. The code for that would look like this (change the Resource Group name below to the actual exact name of the Resource Group):

        if ($resource->get('class_key') == 'Article') {
            $resource->joinGroup('NameOfArticlesResourceGroup');
        }
          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
          • 28582
          • 20 Posts
          Thanks for your advice, however I am still confused about how to connect the RESOURCE GROUP and connecting the group to ADMINISTRATOR user group.

          It would be helpful if we could have a skype conversation?
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            Edit the user group, open the Permissions tab. Select the Resource Group Access item from the left menu, and click the Add Resource Group button. You need do this for each context.
              Studying MODX in the desert - http://sottwell.com
              Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
              Join the Slack Community - http://modx.org
              • 28582
              • 20 Posts
              Thank Susan, I am still confused.

              I have attached screengrab of my User Group, I can see the only way of me understanding what to do is to have a skype conversation or share my screen so I can talk throught the process.

              In my user group I have "Administrator" with my main admin level user access

              When I update User, I then see the User Group options, which permissions is one. In the Resource Group Access tab there is nothing, and when I click Add Resource Group I get a window where I have several options.

              Can you help with exolaining more via skype?
                • 3749
                • 24,544 Posts
                There are some specific security tutorials here: http://bobsguides.com/revo-security-tutorials.html, though some of the initial steps may be different if you're using MODX 2.3.
                  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