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

    I am creating a site with a members only page. After following the tutorials found on the modx documentation I have encountered with a problem.

    When I am logged in to the modx manager, I am able to access de member pages of my site without being logged in using the Login snippet.

    For example, I am logged in as admin in modx manager. I go to my site and the Login snippet says that I'm logged out...but I can see the links of the member pages. When I logout from modx manager, in my site I no longer can access the member pages.

    What am I doing wrong?

    Thank you [ed. note: simcamil last edited this post 11 years, 4 months ago.]
    • Can you link to the tutorial you used?
        • 42467
        • 8 Posts
        • I Can't really see what the problem is that you are having, would you not want the back-end admin to see the member pages? If the admin has a role with a number less than 9999 the admin will be able to see all member pages.
          When testing access permissions in the front-end environment you should only be logged-in in the front-end.
            • 3749
            • 24,544 Posts
            Is the admin a sudo user?

            When I protect pages in the 'web' context, I can't see them until I log in in the front end. The admin can see unpublished pages in the front end, but should not be able to see pages protected with a Resource Group Access ACL entry unless the admin is a member of the User Group that has access to them.
              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
              • 42467
              • 8 Posts
              The admin is not in the user group for the "members only" pages.

              Yes, admin is sudo user. This was like this from the beginning. Isn't this the default setting for admin user?

              I tried unsetting sudo for admin and this solves the problem. Is this the recommended setting for the admin user?

              Edit: After removing sudo user for admin, I can no longer access the modx manager. I had to restore sudo user by manually editing the table in mysql. Therefore this is not a valid solution.
              • The "sudo" user was created as a response to the problem of people accidentally blocking their Administrator users from key activities. The "sudo" user can always do everything.

                Just like in UNIX administration and the "root" user, it is always a good idea to create other admin users with less overarching permissions, and only use the "sudo" user when absolutely necessary.
                  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
                  • 42467
                  • 8 Posts
                  But in my website I am not logged in with any user. I am only logged in inside modx manager. I use the same browser for both the manager and my website, this is what's causing a conflict. If I open manager from one browser (e.g. firefox) and the website from another one (e.g. opera) then this problem disappears.

                  From what I've read, this shouldn't happen since there are different contexts for manager and website...therefore there must be something that I'm doing wrong, but I don't know what it is.
                  • The "sudo" user can do anything, anytime, anywhere. That's the whole point of a "sudo" or "root" 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
                      • 42467
                      • 8 Posts
                      I understand that...but in order to do everything he should at least login on the frontend of the website. Or I'm I wrong in this?

                      Then what do other people do to work with website and manager in the same browser? Do you create an admin user with restricted priviledges like you said before? or do you use 2 browsers?