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

    Just started using MODx again after a break. 0.9.6 rocks!! Excellent work guys on the ajax search integration, you got my nomination!!!

    I’ll be starting a project shortly that will have many different types of Web Users. In the past I have used the Web User system, but all users had the same access etc. I am aware of the document groups and am wondering if this system can be used to provide the following functionality:

    Web users have access to unique documents? (ie I would have an interface to upload a word document, this document would be tied to a web user and be displayed for download once that user logs in)

    I guess a snippet that queries a seperate DB table I create would probably be the best way to integrate this?

    Cheers,

    Justin

    www.justinmeighan.com

      • 23491 ☆ A M B ☆
      • 1,056 Posts
      Justin,

      You can accomplish the majority what you are describing right out of the box. The additional level of security (from the document level down to the user level) would be something you’d have to administer yourself, but in my experience is actually quite easy.

      Assuming you somehow map the user’s file upload to their web user key (internalKey), a snippet or plugin to handle the download can just as easily check:

      $modx->getUserLoginID();
      against the record to see if access should be granted/denied.

      By linking a Document Group to a defined Web User Group, (and applying said permissions to the appropriate document/web user) you will have accomplished the first step of securing the "download gateway" from unauthorized user access. The second step would be the custom PHP code to handle user-specific access to download the file.
        Mike Reid - www.pixelchutes.com
        MODx Ambassador / Contributor
        [Module] MultiMedia Manager / [Module] SiteSearch / [Snippet] DocPassword / [Plugin] EditArea / We support FoxyCart
        ________________________________
        Where every pixel matters.