We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 13501
    • 15 Posts
    Hi,

    i’m not sure if this is the right way to configure my access.
    i need to allow my editor to access "editor" context to upload image which reside on his own profile directory.
    ive set the file_manager path to each individual user setting, which is working.
    and ive set:
    Context access:
    Context: "mgr", min role: "member",
    access policies: "file_upload, file_manager"

    Context: "editor", min role: "member",
    access policies: "file_upload,file_list,file_update,file_remove"

    It seems to be working after ive done my fix that ive blogged here:
    http://mercstudio-tech.blogspot.com/2010/12/modx-2-file-manager-upload-image-on-204.html

    is this correct? or am i missing something here?
    please advice,

    thanks smiley
      • 3749
      • 24,544 Posts
      For security, you should definitely create a new role (e.g., Editor) with an authority level number of 5 or 10 (or 50 if you like -- as long as it’s lower than the member number) and use that as the minimum role rather than member.

      Otherwise, if it’s working, it looks good to me, except that it’s unwise to modify the core code. It’s very seldom necessary and it will be overwritten when you upgrade. OTOH, it looks like you may be working around a bug, in which case it’s fine. wink

      You can get the current dev. version (2.0.5) from git if it has a fix for your problem (and if not, you can contribute by issuing a pull request that includes your change).

      FYI: file_upload, file_list, file_update, file_remove, are permissions, not policies (but then you probably know that already).
        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