NetTalk Central

Author Topic: Individual folder access per user / session  (Read 4208 times)

Niels Larsen

  • Sr. Member
  • ****
  • Posts: 431
    • View Profile
    • Email
Individual folder access per user / session
« on: January 19, 2016, 04:35:13 AM »
Hi Bruce

Is it possible to give individual folder access per user / session?
Reason: I want to give each user individual access to their own folder.

Regards Niels

Stu

  • Hero Member
  • *****
  • Posts: 510
    • View Profile
    • Email
Re: Individual folder access per user / session
« Reply #1 on: January 19, 2016, 05:02:10 PM »
Hi Niels,

I've done this through custom code making sure that a folder for the logged in user exists underneath a "Users" parent folder, which lives underneath a "Files" folder which lives in the "web" folder.

Then everything for that user is stored in and below that particular user folder, unique for that user (logged in).

You can do this with code on the login, a global variable or two (for holding base paths), and then code whereever you need to store files that are uploaded or accessed, that retrieves from the unique path for the user (that can be set in the session on login).

Stu
Cheers,

Stu Andrews

Niels Larsen

  • Sr. Member
  • ****
  • Posts: 431
    • View Profile
    • Email
Re: Individual folder access per user / session
« Reply #2 on: January 21, 2016, 04:41:14 AM »
Thanks Stu

I can control where I want the files to go for eache user, but I need to make sure that no other can get access to that user-folder.
I can not see that your solution helps on that?.
It must work like the Loggedin folder but at session/user level and not only as now, logged in/logged out.

/Niels

MikeR

  • Sr. Member
  • ****
  • Posts: 265
    • View Profile
    • Email
Re: Individual folder access per user / session
« Reply #3 on: January 25, 2016, 03:47:16 AM »
Hi Neils
I think you need to have the folders outside the web folder, so No one can access them.
when a users sign on and wants to see a particular doc you can copy it t the reports folder with a $$$ prefix and serve it from there
Once served the document should automatically be deleted.

Stu

  • Hero Member
  • *****
  • Posts: 510
    • View Profile
    • Email
Re: Individual folder access per user / session
« Reply #4 on: January 25, 2016, 04:18:57 AM »
You can also restrict via the Webhandler embed method (can't remember exact name), where you can test for the user folder (ie use stringtheory to split up the path) against the user credentials in the session - if not the same then get webhandler to say "no go".
Cheers,

Stu Andrews