This project is read-only.

User document area

Topics: Customizing Orchard, General
Jan 28, 2014 at 9:31 PM
I'm fairly new to orchard and as yet never needed to do anything other than customise a sites views and CSS. Is it possible to give registered users protected access to files that can be uploaded by an admin from the admin panel?

So when the user logs in they will see a link in the navigation to a protected page which would contain download links to, for example, PDF files.

Is this type of functionality possible with existing features or would it require a custom module?


Jan 28, 2014 at 10:42 PM
I guess you can create a content type with a name like SecureDownloadableFile, attach a MediaLibraryPickerField to it, make a query out of them, use a projection widget to be displayed in Authenticated layer, put an Html Widget to the same page into Anonymous layer to display a message that the files a available to registered users only.

If you need the link to be available only when user is authenticated, you might need to keep two menus, one to be shown in Authenticated layer, and one for Anonymous layer. I'm not sure though, maybe Content Permissions module would handle it.

When you use MediaLibraryPickerField, the files would be uploaded to the Media folder, which can be accessed publicly. So not very secure. If you need finer security, check for a good discussion and a gallery module ( for a field you can use instead of MediaLibraryPickerField. I haven't used it but it's fairly recent, so it should be OK.

So yes, you can do it without coding your own module.