We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37059
    • 368 Posts
    Am I missing something, or is there no way to define your own permissions for a MODx application, apart from restricting access to particular CMP's? I would like to be able to create custom permissions, then access them from within snippets etc. to restrict access with custom program logic.
      Jason
      • 3749
      • 24,544 Posts
      You can add custom permissions to any Policy Template, then set them in any Policy based on that template.

      Several MODX extras use custom permissions (e.g., NewsPublisher) which are created, along with the policy template and policy, when they are installed.

      A good way to start is to duplicate either the Administrator or Resource policy template. Then delete any permissions you don't want and add your custom permissions before creating a policy based on your policy template.
        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
        • 37059
        • 368 Posts
        Bob, thanks for the reply. I tried that, but was fooled by the "add permission" dialog being a select box. Didn't realize you could define a new permission that way.
          Jason
          • 3749
          • 24,544 Posts
          It is confusing. It should be a combo-box with an input field at the top and a drop-down list below it, but I'm not sure that's possible in this platform without some custom JS.
            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