We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 19309
    • 49 Posts
    Is there a way to choose which media source a certain user group sees first, wen they access the files tab or the MODX browser?

    Or, in other words: What is the best solution for the following situation? I want website editors to only see and use a certain directory for their uploads. To implement this I can either set the basePath and baseURL settings of the “Filesystem” media source to the desired directory. Or I can create a new media source (with the desired path settings) and change access rights in a such a way, that this new media source is the only one which website editors can access. The second way is perhaps(?) a little more flexible, but website editors are constantly forced to switch media sources, since “Filesystem” is still the first resource they see when entering the files tab or the MODX browser.

    This question has been answered by MichaelvanLaar. See the first response.

      • 17667
      • 108 Posts
      Try restricting the Filesystem media source to the Admin user group. Then create a second media source for a specific directory with access for your editors user group. Your editors should then only have the option for the second media source, not the Filesystem.
        • 19309
        • 49 Posts
        No, this doesn’t work – at least not in my test.

        “Filesystem” is always loaded first, even if a user has no rights to see or do anything with it. If an additional media source is the only usable source for a user, the user has to switch to this media source manually every time he comes into contact with files. This is not really user friendly.
          • 3749
          • 24,544 Posts
          Did you flush permissions and settings before testing?


          I suspect that they are shown in the order they were created. So removing and recreating them in the preferred order might work. If that's not possible, you could do it manually in the DB with PhpMyAdmin (though back up the table and/or the DB first).


          ---------------------------------------------------------------------------------------------------------------
          PLEASE, PLEASE specify the version of MODX you are using . . . PLEASE!
          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
            • 19309
            • 49 Posts
            Re-sorting media sources by changing their IDs manually in the database seems to work. But it only worked for the admin account. There seemed to be some problems with access rules for editors.

            Doing this directly in the backend is not possible, since I was not able to delete the “Filesystem” media source (ID 1).

            Using the standard “Filesystem” media source and adapting the paths to what is needed, seems to be the only possible solution.
              • 38339
              • 41 Posts
              Hi Michael

              Maybe you should do a feature request for this?
              Would be nice, if this could be handled like the rank for TV's.

                Revolution 2.2.6
              • discuss.answer
                • 19309
                • 49 Posts
                *facepalm* Things can be so easy if one uses his eyes ;-)

                There is a system setting “default_media_source” which – … surprise, surprise … – does exactly what its name implies.