Developer forum

Forum » Development » API for folder/file security

API for folder/file security

Bjarne Rosendal
Reply

Hi there
 

I am looking for a solution to the scenario that a customer would like to invoke access to files in a specific folder (and subfolders) in the File Manager for "anonymous" downloaders (coming from Google).

The customer is aware, that the Extranet/Intranet extended module exists and performs the exact task of setting up a secure folder and opens up for frontend permissions, but they do not want to invest in that module...
 

So my question is: Is there any API that I can use to check for frontend file permissions when you don't have the Extranet/Intranet module installed?
 

Best regards
Bjarne Rosendal
 


Replies

 
Nicolai Høeg Pedersen
Reply

If you do not have the module, users cannot login and you cannot set permissions.

 

But you can use these APIs:

Manage users and Groups: Dynamicweb.Modules.UserManagement

Manage permissions on files: Dynamicweb.Content.Files

Logging in: Dynamicweb.Security.

 

Happy coding. I can send you a copy if you want. So you can recreate all of it...!

 

BR Nicolai

 
Bjarne Rosendal
Reply

Hi Nicolai

 

They do have the regular Extranet/Intranet module if that helps :)

Please do send me a copy for inspiration. bro@bleau.dk

 

/ Bjarne

 
Mikkel Toustrup Olsen
Reply

Hi Niciolai,

I am about to implement more or less the same functionality. I have created a generic download handler, which works perfectly. Though, I want to restrict file access for the logged in extranet user. I see it's possible to do it on a folder-level, but cannot seem to find the file-level permissions? .. Is this possible? :-)

The approach is to have x-amount of files in 1 folder called Upload, to which an extranet user group has access to(which could be e.g. 50 users). In this folder as before mentioned, there can be x-amount of files. Each of these files has a specific permission. User A can have access and only access to e.g. 5 of these etc..

Is this possible? :-)

 

 

You must be logged in to post in the forum