We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3749
    • 24,544 Posts
    I’m working on a tutorial for hiding Top Menu items in the Manager and have run into an issue that involves custom permissions for admin users.

    I’m assuming that the Administrator Policy and Policy Template might be overwritten on upgrade. One way of adding a safe custom permission would be to duplicate the AdministratorTemplate, add the custom permission to it, and create a duplicate of the Administrator Policy based on the duplicate template. This is no longer possible, since you can’t change the template of the Administrator policy.

    I can create a new policy based on the duplicate template, but that would mean two Administrator ACL entries with 130 Permissions, which seems like it would slow things down significantly (and I can’t delete the original mgr/Administrator Context Access ACL entry).

    I can create a new policy template with the single custom permission, base a policy on it, and create a mgr Context ACL entry for the Administrator group with that policy, but it seems it would be more efficient to just have the custom permission added to the main mgr Context ACL entry for Administrators.

    My question is: Will the standard Administrator policy and policy template remain uneditable and will the original ACL entry remain undeletable? I can see the sense of that, but I need to know for sure (and do some more rewriting of the book tongue).

      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
      • 28215
      • 4,149 Posts
      Quote from: BobRay at Jun 06, 2011, 06:17 AM

      I can create a new policy template with the single custom permission, base a policy on it, and create a mgr Context ACL entry for the Administrator group with that policy, but it seems it would be more efficient to just have the custom permission added to the main mgr Context ACL entry for Administrators.

      This is what you should be doing. Custom permissions need to go in custom policies.

      If we allow editing of the administrator policy, then upgrades become a nightmare. Plus, it increases the chance that people will botch their install.
        shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
        • 3749
        • 24,544 Posts
        It would be a custom policy either way, but I agree about botching
        Things.
          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