We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!

Answered Adding a user.

    • 50520
    • 7 Posts
    So I want to add a user that can only edit content in TV's

    I followed this guide.
    http://rtfm.modx.com/revolution/2.x/administering-your-site/security/security-tutorials/giving-a-user-manager-access

    when editing the permissions in (access control lists > access policy) unticked all but [edit_document][edit_tv]

    and ended up with a user that can't login. add the username / password and submit but the login page just refreshes. The login logs show that the user was logged in but nothing happened.

    The user can only login if the SUDO option is ticked but that defeats the object.
    any help is greatly appreciated.

    This question has been answered by sottwell. See the first response.

    • There are a number of permissions that are needed to access the Manager at all.

      Try assigning your user to a group with the "Editor" permission. If all you want the editor to be able to edit is a resource's TV, then you'll need to use Form Customization to hide everything else for users in this group.
        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 log in, a user's User Group needs a Context Access ACL entry for the 'mgr' context. To see resources in the tree, they also need one for the 'web' context.
          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
          • 50520
          • 7 Posts
          Quote from: sottwell at May 27, 2015, 03:28 PM
          There are a number of permissions that are needed to access the Manager at all.

          Try assigning your user to a group with the "Editor" permission. If all you want the editor to be able to edit is a resource's TV, then you'll need to use Form Customization to hide everything else for users in this group.

          Tried that but still can't login. Infact it's not possible to log in with any new user, unless SUDO is ticked.



          Quote from: BobRay at May 27, 2015, 04:31 PM
          To log in, a user's User Group needs a Context Access ACL entry for the 'mgr' context. To see resources in the tree, they also need one for the 'web' context.



          They have these, as per this guide, which you co-wrote smiley

          http://rtfm.modx.com/revolution/2.x/administering-your-site/security/security-tutorials/giving-a-user-manager-access

          On the Permissions -> Context Access tab, add two new entries to the grid:

          Context: 'mgr' Minimum Role: 'Editor', Access Policy 'AdminLite'
          Context: 'web' Minimum Role: 'Editor', Access Policy 'Load, List and View'

          But the user can't login unless SUDO is ticked.
          • discuss.answer
            1. Create new User Group:
            Name - Editors
            Contexts: web,mgr
            Manager Policy: Content Editor

            2. Right-click on the new Editors group and choose Update Group.
            Open the Permissions tab.
            Context Access: Access Policy for web and mgr - Content Editor

            3. Create new User
            Access Permissions:
            User Group - Editors
            Role - Super User
              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
            • As far as the "edit_tv" permission, this is to allow editing of the TV itself, not the TV's value for a resource. The latter is included in edit_document permissions.
                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
                • 50520
                • 7 Posts
                Quote from: sottwell at May 28, 2015, 01:04 AM
                1. Create new User Group:
                Name - Editors
                Contexts: web,mgr
                Manager Policy: Content Editor

                2. Right-click on the new Editors group and choose Update Group.
                Open the Permissions tab.
                Context Access: Access Policy for web and mgr - Content Editor

                3. Create new User
                Access Permissions:
                User Group - Editors
                Role - Super User

                Thank you for all your help BobRay and sottwell, i hope in the future I can build a good working knowledge of MODx.

                My created user can login now after changing the role to Super User and adding the same permissions and context editor, then slowly removing some other permissions 1 by 1.

                So im not sure if stage 6 of the guide needs updating, or I just don't understand it well enough to figure out the relationships, & therefore I'm making fundamental mistakes.

                http://rtfm.modx.com/revolution/2.x/administering-your-site/security/security-tutorials/giving-a-user-manager-access

                The guide in step 6 says
                In Manage -> Users, create the new user, or edit existing, and via the Access Permissions tab, assign them to the Administrator group with a role of Editor.

                I think MODx is great, adding a site is, very simple, and shocked me how easy it was, but very daunting in some areas, especially if you have more of a procedural mindset like myself. I think an "add user wizard" would be a massive plus for the future.


                The reason I need such a restricted user, is because I'm mainly involved in design stuff, and I want a simple MODx demo site so that potential customers can edit 1 or 2 TV's just so they get an idea before asking me to go ahead and install MODx as their chosen CMS.

                Which leads me onto another question. Can I run a cron job with a script to update the database, once a day to reset the TV's to what they were before? For example, a customer edits a TV with the demo account, then saves, and views the content. Later a cron resets the database table for those TV's back to the default. Is that possible or will it cause issues, or even better is there a built in feature to allow the same?
                Edit: now asked the cron job question in another thread.
                http://forums.modx.com/thread/97277/running-a-cron-job-to-reset-a-template-variable#dis-post-526127

                Thanks again.
                [ed. note: yawnuser last edited this post 8 years, 11 months ago.]
                • The documentation is badly outdated in many cases. The user management system is extremely powerful, but extremely difficult to get a handle on. I would recommend BobRay's tutorials rather than the "official" docs. http://bobsguides.com/creating-manager-users.html

                  I almost always just assign the "super-user" role, because in most cases it really doesn't make any difference. It is used for very finicky control in the case of a large number of Manager users with different sections of the site as their responsibility. For example there might be a bunch of "marketing" group users, and you only want them to work with the "marketing" pages, and some can publish (probably a super-user), some can't. Personally I've never had any use for that level of control. [ed. note: sottwell last edited this post 8 years, 11 months ago.]
                    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
                  • Here's a nice tutorial on customizing the resource editing forms using Form Customization. You can use this to move fields around, hide fields, and other customization. http://www.cmstricks.com/blog/2012/08/27/integrating-a-template-into-modx-part-5/
                      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
                      • 50520
                      • 7 Posts
                      Quote from: sottwell at May 28, 2015, 04:25 PM
                      Here's a nice tutorial on customizing the resource editing forms using Form Customization. You can use this to move fields around, hide fields, and other customization. http://www.cmstricks.com/blog/2012/08/27/integrating-a-template-into-modx-part-5/

                      That is great thanks, some of the options again are in a different place to MODx rev 2.3 but no too difficult to figure out.

                      Now I have the forms and the restricted user =)

                      however I have a problem, in that, the site in question only shows if either user (admin), or (demo) is logged in.

                      If no one is logged in to MODX manager, on a different tab the front end of the site returns;

                      503 Error

                      Page not found

                      The page you requested was not found.


                      but if any user is logged in the site returns the main template as normal.


                      EDIT: Confirmed the problem was between the chair and the keyboard. Issue resolved smiley [ed. note: yawnuser last edited this post 8 years, 11 months ago.]