Developer forum

Forum » Development » Upgrading to DW8 - Security().HasAccessToFile()

Upgrading to DW8 - Security().HasAccessToFile()

Allan Harling Michaelsen
Reply
Hi All
While upgrading a module to DW8 I came across this function and I can't find a replacement in DW8.
 Security objFileCheck = new Security();

                            while (drIndexServer.Read())
                            {
                                if (objFileCheck.HasAccessToFile(drIndexServer["Path"].ToString()))
                                {
Does anyone have a hint as to where I can find this or a similar function in DW8
/Allan

Replies

 
Morten Bengtson
Reply
Try this...
// Admin permission
Dynamicweb.Content.Files.Permission.HasAccess("/Files/Filer/SecureFolder/Docs/")

// Front end permission
Dynamicweb.Content.Files.Permission.HasAccessFrontend("/Files/Filer/SecureFolder/Docs/")

 

You must be logged in to post in the forum