We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28100
    • 66 Posts
    I have embedded a dhtmlx.com script (scheduler) into a blank template and it is all running well.

    I have one resource group set up and 2 usergroups. One group (Editors) can see and edit the schedule whereas the other group (Staff) can only see it. I've achieved this by using Personalize to output "scheduler.config.readonly = false;" to Editors and "scheduler.config.readonly = true;" to staff;. Works great for them, they log in and get a new link in the menu and they can navigate to the schedule and either edit or not depending on what permissions get served to them.

    For me as Administrator, I can see the link in the menu, I can access the schedule BUT I get served the same chunk as the read-only Staff group (scheduler.config.readonly = true).

    My snippet:
    [[!Personalize? &allowedGroups=`Editors,Administrator` &yesChunk=`Editors` &noChunk=`Staff`]]

    I added Administrator in to see if it would make a difference otherwise it was just Editors listed as an allowed group.

    What am I missing here? Why would I be getting served the &noChunk - how can I make sure I get served the &yesChunk?
    (The default permissions (in the files) are readonly=false.)
      • 3749
      • 24,544 Posts
      Did you flush both permissions and settings before testing?

      Are you (as an administrator) viewing the pages by jumping to them from the Manager? That won't work because when you do that, you're the anonymous user until you explicitly log in in the front end. Your manager log in doesn't count in the front end.
        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
        • 28100
        • 66 Posts
        Hi BobRay

        Thanks for a great little addon!

        As an admin, I can't log in to the front at all. To test I've viewed the front end jumping from the back end ... or I've used a different user account to to test that a) the schedule link doesn't appear in the menu bar until after login and b) that the 2 different logged in user groups can see the menu link and their viewing/editing permissions are correct for the schedule (using different browsers).

        As an anonymous user I shouldn't be able to see either the menu link or the protected page ?

        And yes, flushed permissions and cache(s).

        Thanks! smiley
          • 3749
          • 24,544 Posts
          If you have &yesChunk=`Editors` and you are not a member of the Editors group, I think that would explain why you're seeing the "Staff" chunk.

          I confess that I'm baffled that you can't log in in the front end. Your Manager credentials should work fine there. The only way I can think of that this could happen is if you've created a Context Access ACL entry for the web context for some other group *and* removed the default one for the Administrator group.
            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