NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: Niels Larsen on January 19, 2016, 04:35:13 AM

Title: Individual folder access per user / session
Post by: Niels Larsen 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
Title: Re: Individual folder access per user / session
Post by: Stu 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
Title: Re: Individual folder access per user / session
Post by: Niels Larsen 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
Title: Re: Individual folder access per user / session
Post by: MikeR 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.
Title: Re: Individual folder access per user / session
Post by: Stu 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".