Hello DNN-gurus,
I would like to add an folder programmatically within an module - but I have big problems - hope you can help me:
The idea:
A user, call him "Robert", only sees his own folders -> that's no problem - I use: folders As ArrayList = FileSystemUtils.GetFoldersByUser(PortalId, False, False, "WRITE")Then this user would create a new folder e.g. "TestProject" - I use:
Dim
FileSystemUtils.AddFolder(
MyBase.PortalSettings, UserID, "TestProject")
-> doesn't work: I get System.UnauthorizedAccessException {"Access to the path 'TestProject' is denied."} - the user HAS rights to write in this folder structure.
I mean, the folder structure goes like this:
/Portals
/Portals/0 -> for Administrator
/Portals/1 -> User with UserID1
/Poartls/2 -> User with UserID2
/Poartls/3 -> User with UserID3
Imagine that "Robert" has UserID2 - within that folder I would like to add the new one "TestProject" -> hardcoded it means:
/Portals
/Portals/0
/Portals/1
/Portals/2
/Portals/2/TestProject
/Poartls/3
FileSystemUtils.AddFolder(MyBase.PortalSettings, 2, "TestProject") -> no change!
Can you give me a hint or an example how I could do that?
MANY THX for your response and any ideas!!!
Cheers,
Robert