We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25551 ☆ A M B ☆
    • 1,231 Posts
    I have asked this question in a snippet thread a while back but thought I would ask in more detail here.

    Can MODx create folders on a web server and apply permissions to that folder that only the web_user can access it? What I want to do ultimately is have a user sign up, have pages created for them and a folder that this user can upload to. I already have documents created on sign up and only this person can edit them (using front end manager) but I would like to have a folder created in say /assets/users/myfolder. I would then like to use tinymce to then browse these folders and add something they have uploaded.

    Tinymce allows you to create folders anyway but it allows anyone who uses it, access to any folder or document that is uploaded. I would like to keep things private to a specific user... Could the browse button in tinymce be altered to checked who the user is, then allow them access to a folder that was created on their registration?

    I guess it’s similar to how Maxigallery works... you can have web users create galleries which creates folders with the page ID.

    I’m sure you get the idea... is it possible to do, if so how difficult is it and is it a large project to take on?

    Thanks!

      Ross Sivills - MD AugmentBLU Edinburgh, Scotland UK
      AugmentBLU - MODX Partner

      BLUcart - MODX Revolution E-Commerce & Shopping Cart
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      That would be a function of the resource browser, not MODx per se. Depending on your Rich Text editor and its version, this is most likely manager/media/browser/mcpuck. This resource browser has an authentication system; connectors/php/Auth/default.php. You might be able to do something with that.
        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
        • 25551 ☆ A M B ☆
        • 1,231 Posts
        How secure would it be to modify the code to allow this? I want to start up a site for `junior` web developers and allow them to have a myspace style page that they can show their work on. I want to offer hosting of their work to be displayed on their pages yet have it in a secure location for them to browse and add to their profile. As I said, I have pretty much everything sorted out apart from the uploading... I have it already setup for uploads to go to /assets/useruploads on my server, I modded the tiny code to disable the delete buttons so no one can delete another’s uploads but they can browse any folder or file uploaded. SO close yet so far, as you know Su I’m not a programmer lol. Creating a simple switch statement with the help from Bob was my limit of understanding grin
          Ross Sivills - MD AugmentBLU Edinburgh, Scotland UK
          AugmentBLU - MODX Partner

          BLUcart - MODX Revolution E-Commerce & Shopping Cart
          • 4018
          • 1,131 Posts
          Hey rossco,

          This kind of functionality is definitely on my to-do list. In it’s current state, the resource browser doesn’t have any easy way to allow for the kind of functionality you want. It just wasn’t built with webusers in mind. Modifying it to do this would be a little difficult so I’ve been putting this on the back burner. Instead, I would like to just completely replace the resource browser with something more modern that can easily be modified to accommodate this kind of functionality. There’s a lot of security issues that have to be kept in check when writing an application that does this sort of thing so I wouldn’t want to blindly create it without making sure the file system is kept secure.

          Hope this answers your question. smiley

          Jeff
            Jeff Whitfield

            "I like my coffee hot and strong, like I like my women, hot and strong... with a spoon in them."
            • 25551 ☆ A M B ☆
            • 1,231 Posts
            Thanks for the reply, it would be nice to get some sort of resource browser that has permissions. It’s the last thing on my list for my project that I want to carry out as well lol. I shall wait and see what happens in the future. Thanks!
              Ross Sivills - MD AugmentBLU Edinburgh, Scotland UK
              AugmentBLU - MODX Partner

              BLUcart - MODX Revolution E-Commerce & Shopping Cart