Portal Engine Questions on portal engine and web parts.
Version 6.x > Portal Engine > Restricting access to document attachments View modes: 
User avatar
Member
Member
m.rutter - 6/26/2012 7:52:47 AM
   
Restricting access to document attachments
Hi everybody.

I need to restrict the access to attachments stored under a document (Properties -> Attachments). To download a file attachment, a user should be authenticated.

Attachments are displayed by the page template using a web-part. Of course, I can show/hide attachment URL checking user credentials ... but if the user knows the URL to the attachments, he/she is able to download it.

Does exists a way to do that?

Thank you.
MR

User avatar
Kentico Consulting
Kentico Consulting
kentico_borisp - 6/27/2012 4:31:37 AM
   
RE:Restricting access to document attachments
Hello,

The attachments should require the same permissions as the document they are attached to. So, if you place a security permission (e.g. requires authentication) on the home page and try to access the attachment attached to this page, then the user needs to be authenticated too.

Best regards,
Boris Pocatko

User avatar
Member
Member
m.rutter - 6/27/2012 5:39:20 AM
   
RE:Restricting access to document attachments
Hello Boris, thank you for you answer.

I know what you're writing but this is a different problema. In my case I need the document to be visible to everyone, and its attachments to be downloadable only to registered users.

Of course a workaround exists and it consists in saving attachments on a separate (and protected) folder (or media library). But doing so, I have new issues such as: CMS Editor need to save documents in a separate location than the document; the CMS Editor needs to know the path for the attachments and embed them in the document body; and so on.

A best control over attachments would be appreciated. For example a solution could be to add a specific "right" (see Security tab) to the document: allow attachments download.

Thank you.
MR

User avatar
Kentico Consulting
Kentico Consulting
kentico_borisp - 6/27/2012 6:54:14 AM
   
RE:Restricting access to document attachments
Hello,

Thank you for your suggestion. You can submit a new feature suggestion on our user voice page. After a review your feature might get implemented in future versions.

Best regards,
Boris Pocatko