We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 19604 ☆ A M B ☆
    • 179 Posts
    Hi there,
    I want to hide some TVs from the normal users and only show them to the admins. I could do that with "form customization" – but then for every new TV I would have to go through the whole process again.

    Is there a way to do that with "resource groups"? I can asign a newly created TVs to a resource group but then it disapear for everyybody. How can I make it visible just for some users? It would be great if all TVs of a category would be "protected" automatically. THAT would be awesome.

    Any hints or any ideas how to do that with MODX?


    Thanks
    Oliver
      MINDEFFECTS – DESIGN for PRINT, WEB and MEDIA
      http://twitter.com/mindeffects · http://www.facebook.com/mindeffects · http://www.youtube.com/mindeffects/ · skype://mindeffects_oliver
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Put the users you want to view the TVs into a user group that's connected to the resource group. Don't forget to include your admin 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
        • 3749
        • 24,544 Posts
        You can also protect them by category if you create an Element Category Access ACL entry connecting the category to the Administrator group. TVs in that category will be hidden from people outside that group.

        You can give selected users access to them with another Element Category Access ACL entry connecting the category to their User Group.

        I'm not sure about this, but you may have to adjust the permissions some for that to work correctly. I've seen reports of cases where the TVs were not visible and got saved with blank values when the Resource was saved, so the process may be a little quirky, though I've never been able to duplicate this behavior.


        ------------------------------------------------------------------------------------------
        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
          • 19604 ☆ A M B ☆
          • 179 Posts
          Thanks for you reply!
          I tried that but still I can't see the TV. It's hidden from everybody.

          Here are my UserGroup-Settings

          1. Tab USER: UserX is Super-User (Role 0) and member of the group "Administrator"
          2. Tab CA: mgr + web, MR 0, AP Administrator
          3. Tab CA: mgr, MR role 9999, AP Resource
          4. Tab RGA: RG AdminRG, MR 9999, AP Object,CT mgr
          5. Tab RGA: RG AdminRG, MR 9999, AP Object,CT web
          6. Tab ECA: CATEGORY Admin, MR 9999, AP Object,CT mgr
          7. Tab ECA: CATEGORY Admin, MR 9999, AP Object,CT web

          Where is my bug? Are the access policies correct?

          Do I even need the resource group thing? If my TV is in the category "Admin", maybe the "element category acees" is enough?

          Thanks you so much for you help!
          Oliver

          P.S.: Will we meet at the MPDXpo in NL?
            MINDEFFECTS – DESIGN for PRINT, WEB and MEDIA
            http://twitter.com/mindeffects · http://www.facebook.com/mindeffects · http://www.youtube.com/mindeffects/ · skype://mindeffects_oliver
            • 3749
            • 24,544 Posts
            Either the Resource Group or the Category method should work. You shouldn't need both.

            I can't tell what User Group each ACL entry is for.

            For #3, I think the Policy should be 'Load, List, and View' -- the Resource Policy is only for RGA ACL entries.

            Did you add the admin Super User to all User Groups (with a Role of admin Super User)? If not, the elements will be hidden from that user.

            I am going to MODXpo. I look forward to meeting everyone in meatspace. wink



            ------------------------------------------------------------------------------------------
            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
              • 19604 ☆ A M B ☆
              • 179 Posts
              OK, got it working:
              Category: zAdmin
              Minimum Role: Member - 9999
              Access Policy: Object
              Context: mgr
              

              Thats all. Works like a charme: All admins can edit the TV, the others don't see it. Very usefull for my "contentAfter" and "contentBefore" TVs. ;-)

              cheers ans thanks to you all
              Oliver

              P.S.:
                MINDEFFECTS – DESIGN for PRINT, WEB and MEDIA
                http://twitter.com/mindeffects · http://www.facebook.com/mindeffects · http://www.youtube.com/mindeffects/ · skype://mindeffects_oliver