Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more

Solution for Handling File Upload Permissions in Episerver CMS 12

Vote:
 

Hello,

We are currently working with Episerver CMS 12 and have a challenge related to file upload permissions. In our setup, we have two custom groups mapped: "Author" and "Approver." Authors have all permissions except Administer rights.

We’ve set up Episerver forms, including a file upload element. After users submit the form, an email is sent to a defined group with the details of the submission, including a link to the uploaded file. However, when the designated users click on the file link in the email, they receive a "resource not found" error.

In CMS 11, we were able to resolve this by explicitly adding permissions to a folder named "Uploaded Files," as suggested in this article:

Episerver Forms: Public Access to Uploaded Files

However, with CMS 12, the EditSecurity.aspx approach is no longer supported.

Does anyone have a solution or alternative way to handle file access permissions for uploaded files in CMS 12?

Regards.

#336476
Feb 06, 2025 14:56
Vote:
 

This is probably the solution for your question How to: set access right to folders - Quan Mai's blog

#336518
Feb 07, 2025 8:48
Farhin - Feb 08, 2025 0:45
Thanks, Quan. This worked like a charm! However, I do have a follow-up question, and I’d appreciate it if you could shed some light on this. I’ve created custom groups in Optimizely, "Author" and "Approver." I added them as follows, but the files were still not accessible until I added the "Everyone" role. This same issue occurred in CMS 11 as well. Shouldn’t custom roles work?

writableDescriptor.AddEntry(new AccessControlEntry("Everyone", AccessLevel.Read, SecurityEntityType.Role));
writableDescriptor.AddEntry(new AccessControlEntry(author, AccessLevel.Read | AccessLevel.Create | AccessLevel.Edit | AccessLevel.Delete, SecurityEntityType.Role));
writableDescriptor.AddEntry(new AccessControlEntry(approver, AccessLevel.Read | AccessLevel.Create | AccessLevel.Edit | AccessLevel.Delete | AccessLevel.Publish, SecurityEntityType.Role));

Quan Mai - Feb 12, 2025 10:09
I'm not quite sure but if it is consistent with CMS 11 then it should be intentional. Maybe because static files were filtered for everyone access unless you are using the Editor UI
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.