We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
  • How do you add a Media Source to a group?

    I want full access to the entire file system limited to Administrator users. I created a clone of the Filesystem media source and made sure it worked as expected in the Files tab. Then I assigned it to the Administrators group, with a role of "Super User - 0" and a Policy of "Media Source Admin".

    To begin with, it showed up in the Files tab select, but didn't display anything if selected. Then I flushed permissions, and flushed sessions. Now it doesn't show up at all in the Files tab select, and in fact doesn't show up at all in the Tools -> Media Sources list. huh [ed. note: sottwell last edited this post 12 years, 4 months ago.]
      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
      • 28215
      • 4,149 Posts
      This was a bug in rc1 and fixed very recently, I believe. Try updating to the latest nightly.
        shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
      • I just did. Fresh installation of 121411.
          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
        • Actually, I think I have bigger problems here. Fresh new installation, first thing I do is go to Security -> Access Controls, Access Policies. Open any of them and there's no list of permissions visible. No save/close/help toolbar either. A new installation of RC1 is fine.
            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
            • 28215
            • 4,149 Posts
            Yes, update again. I published a nightly this AM that fixes that.
              shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
            • Ok. Working now.

              Back to assigning a Media Source to a group. Again, I cloned the existing default Filesystem media source. Renamed it. Assigned it to the Administrator group, super user, media source admin. Flush permissions, doesn't show up in the Files tab and also is not showing on the list of media sources in Tools. Am I missing something? It works fine if not assigned to a group. I see in the access_media_source table there's an entry that looks something like this...
              id -> 1
              target->2
              principle_class->modUserGroup
              principal->1
              authority->0
              policy->8
              context_key-> (empty)
                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
                • 28215
                • 4,149 Posts
                You might need to flush sessions.
                  shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
                • I did; flushed permissions and flushed sessions. No go, the media source just "disappears" to the Administrator 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
                  • I would be very appreciative if someone could explain how to protect a media source; as it is, nothing I've tried appears to work. As soon as a group is assigned to the media source, it vanishes from view.

                    I'm using the latest nightly build (2.2 rc2 121511), and using the existing original permissions with no other change than to create the new Media Source.

                    1. Duplicate the existing Filesystem media source, rename it to AllFiles.

                    2. Check, it's available in the Files tab media source selector and does in fact display all files. It's also still there in the Tools->Media Sources list.

                    3. Add the User Group "Administrator" with a minimum role "Member" and a policy of "Media Source Admin".

                    4. Flush permissions, flush sessions, log in again.

                    Now, I would expect this to cause the new Media Source to only be visible to Administrator users. Instead, it just vanishes from view.

                    So what is wrong with this scenario?
                      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
                      • 28215
                      • 4,149 Posts
                      Something is definitely wonky with your environment or permissions setup. I just replicated the exact steps you said and mine shows up fine.

                      Do you have any errors in the error.log?
                        shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com