We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 12110
    • 122 Posts
    We have tried several solutions but have not found out how to limit an editor’s (manager user) rights to only see the images directory when calling the file manager in the backend.

    We tried to set the file manager path to .../assets/images/ in the manager user settings, but then no images preview was shown in the file manager and also inserting images is not possible in the Quick Edit.

    It would be very helpful so the user has less folders in the file manager.

    Thanks!
      • 2734
      • 165 Posts
      Hi.

      Have you tried entering an absolute Path as your File-Manager Path? That should work. However the File-Manager Path is not identical with the Ressource-Path... what are you trying to limit, the File Manager access or the Ressource-Browser Access?

        • 12110
        • 122 Posts
        Hi, and thanks banal.

        Yes we did use the full server path /kunden/.../webseiten/assets/images as file manager path in the config settings. Result as in the first post described: no image preview was shown in the file manager and also inserting images is not possible in the Quick Edit.

        I’m not sure about your second question. The user goes to the file manager via "Ressources" tab. I’m not talking of managing templates, snippets, chunks (this is disallowed already for the user), but of managing images, documents. So I want to limit the access to the folder assets/ images/ in the file manager or/and to assets/documents.

        There should be a way ...?

        Thanks again!
          • 2734
          • 165 Posts
          Well. It seems like you just forgot a slash at the end of your path.
          If i where you, i wouldn’t change the config settings. Just change the settings on a user basis (go to "Security" > "Manager Users" and edit the "File Manager Path" in the "User-Tab" of the desired user). Enter your physical path there and add a trailing slash: /whatever/assets/images/

          After that, the user should be restricted to this directory when using the File Manager
          Regards -- roman
            • 12110
            • 122 Posts
            Hello again,

            Thanks - the path routing to the filem manger images directory is working now.

            Everything seems to work when the user is logged in and looks at the file manger.

            But when he wants to preview an image there’s no response. Might be there’s an issue in the manager/index.php script or one of the included files ?

            The image is in a subfolder (motive-gross) of the images folder. In the source code I found that the onclick event for previewing an image reads:
            onClick='viewfile("..//assets/imagesmotive-gross/motiv-modx.gif");'


            It should probably read:
            onClick='viewfile("../assets/images/motive-gross/motiv-modx.gif");'


            As you can see in the attached screenshot (title of page line) the pathes seem to be correct. It doesn’t matter if the image is in a subfolder of /images/ or not.

            Thanks again!
            Guenter
              • 2734
              • 165 Posts
              Hi.
              Great, some progress smiley
              You should probably fix your "Resource URL:" Setting. Change it from "/assets/images" to "assets/images/" (note the slashes).

              Cheers -- roman
                • 12110
                • 122 Posts
                Hi banal again,

                thanks, but I had set trailing slashes everywhere :-(

                In the Security/Manager Users/ Edit User settings the
                - file manger is set to /kunden/102604_85625/webseiten/assets/images/
                - ressource path is set to /kunden/102604_85625/webseiten/assets/
                - ressource url is http://www.erfolgreiche.webseiten.cc/assets/

                In the Tools/ Configuration / Interface & Features settings
                - ressource path is set to /kunden/102604_85625/webseiten/assets/
                - ressource url is http://www.erfolgreiche.webseiten.cc/assets/

                I’m gettimg the same HTML output as before:
                onClick='viewfile("..//assets/imagesmotive-gross/motiv-modx.gif");'


                The only case when the user is able to preview images in the file manger is when the file manager path ist set to /kunden/102604_85625/webseiten/
                But then he isn’t limited to view only a subfolder of assets i.g. /images/

                I’m using ModX 0.9.5. So for today I’m abandoning, I hope there will be more progress tomorrow...
                Nice evening from Bavaria to everybody