We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 9995
    • 1,613 Posts
    fourroses666 Reply #1, 12 years ago
    I have a protected page, when u go to that page it redirects to the homepage and not the page with the id i have set in the systemsettings unauthorized_page.

    How can I fix this? I don't understand this line:
    This will only work if you have a 'load' Permission (via a Load policy or custom policy) set to the context that the Resource being accessed is in.

    http://rtfm.modx.com/display/revolution20/unauthorized_page [ed. note: fourroses666 last edited this post 12 years ago.]
      Evolution user, I like the back-end speed and simplicity smiley
      • 3749
      • 24,544 Posts
      See the section here on "Unauthorized Versus Error Page": http://bobsguides.com/revolution-permissions.html


      ------------------------------------------------------------------------------------------
      PLEASE, PLEASE specify the version of MODX you are using.
      MODX info for everyone: http://bobsguides.com/modx.html
        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
        • 9995
        • 1,613 Posts
        fourroses666 Reply #3, 12 years ago
        Thanks, I'll give it a try. I hate that section sad
          Evolution user, I like the back-end speed and simplicity smiley
          • 9995
          • 1,613 Posts
          fourroses666 Reply #4, 12 years ago
          I really dunno how to do this. (Rev 2.2.0pl2)
          To hard to understand for me, why is it so complicated.

          Isn't there a package which can do this sad


          Create a new Resource Group Access ACL entry for the Anonymous User Group with the Resource Group of the protected resources, a Context of "web," a Role of "Member" and an Access Policy of "Load Only." Do this for each protected Resource Group

          Note that this won't solve the problem for users who are logged on in the front end but are trying to access pages they are not authorized to see. To solve it for those users, add them to the User Groups authorized to see the pages, but with a Role of "Member." Then, Update the User Groups and add another Resource Group Access ACL entry for the group with the Resource Group set to the protected resources, a Minimum Role of "Member" and a policy of "Load Only."

          Documentation says:
          This will only work if you have a 'load' Permission (via a Load policy or custom policy) set to the context that the Resource being accessed is in.
          [ed. note: fourroses666 last edited this post 12 years ago.]
            Evolution user, I like the back-end speed and simplicity smiley
            • 3749
            • 24,544 Posts
            It's simpler to do than to describe.

            That thing at the bottom of your message only applies if you have multiple front-end contexts. If you're not sure, you don't. If the resource is in the 'web' context (IOW, under the 'web' folder in the tree), and it probably is, you can ignore it that warning.

            Let me try to make it even simpler:

            1. Make a note of which resource group the protected resource is in.
            2. Go to Security -> Access Controls
            3. Right-click on the (anonymous) user group
            4. Select "Update User Group"
            5. Click on the "Resource Group Access" tab
            6. Click on the "Add Resource Group" button
            7. Using the drop-down lists, select the following:
                Resource Group: The group you noted in step 1
                Context:  'web' (or whatever context the resource is in)
                Minimum Role: Member-999
                Access Policy: Load Only


            8. Click on the "Save Button" in the dialog

            9. Flush permissions
            10. Flush all sessions


            That should do it. smiley



            ------------------------------------------------------------------------------------------
            PLEASE, PLEASE specify the version of MODX you are using.
            MODX info for everyone: http://bobsguides.com/modx.html



            [ed. note: BobRay last edited this post 12 years ago.]
              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
              • 9995
              • 1,613 Posts
              fourroses666 Reply #6, 12 years ago
              Thanks allot Bob, it works. laugh
              [ed. note: fourroses666 last edited this post 12 years ago.]
                Evolution user, I like the back-end speed and simplicity smiley
                • 9995
                • 1,613 Posts
                fourroses666 Reply #7, 12 years ago
                ## edit ##

                thought it didn't work anymore but i think it didn't because i was logged into the manager?!

                [ed. note: fourroses666 last edited this post 12 years ago.]
                  Evolution user, I like the back-end speed and simplicity smiley
                  • 3749
                  • 24,544 Posts
                  When you're previewing from the Manager, you're logged in to the 'mgr' context but not to any front-end contexts unless you explicitly log in in the front end. You also have the right to see unpublished documents, so it's easy to get confused.


                  ------------------------------------------------------------------------------------------
                  PLEASE, PLEASE specify the version of MODX you are using.
                  MODX info for everyone: http://bobsguides.com/modx.html
                    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
                    • 9995
                    • 1,613 Posts
                    fourroses666 Reply #9, 12 years ago
                    Indeed it is! smiley

                    Thanks again for ur detailed help Bob.
                      Evolution user, I like the back-end speed and simplicity smiley