New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsDocumentsDocumentsHow to deny file downloads for unregistered users?How to deny file downloads for unregistered users?
Previous
 
Next
New Post
10/29/2009 6:13 PM
 

I would like to deny downloading of files for users that are not registered/logged. Is there any possibility?

I know that it can be done via Admin>Folders and you can set folder permission based on user's role. But in this case, the content of the module will not be visible. I want that the titles of available documents stay visible, but links are disabled.

Can it be done?

 
New Post
10/29/2009 11:42 PM
 

Use the form & List or UDT module based on your version of DNN and secure the files in the file manager.


Icthus Technologies

Building Faith on the Internet
 
New Post
10/30/2009 12:02 PM
 

Thank you, I tried tried to implement your solution. But it's not working as I would like it to work.

I placed the form and List module on my page, then I created a column with type "DOWNLOAD", and after that, I inserted a record, pointing to existing file on my site.

Then, I went to Admin>File Manager, and restricted access to folder containing my test file to unautehenticated users.

Now, if I am logged in, when I click on file to download, it works ok.

But if I am not logged in, if I click on the file to download it, I am redirected to the ugly ASP.NET 404 Error Page, saying: "The resource cannot be found"

I would like to show a message instead, explaining that the download is restricted to authenticated users only. Or, just to not show the download link.

Can it be done easily?

 

 

 
New Post
10/30/2009 1:04 PM
 

Codex,

You should be able to do this with a User Defined Table (form and List) and custom XSLT.

You can then hide the field based on whether the user is logged in or not.

Here is an example of the XSLT code:

              <xsl:if test="//udt:Context/udt:UserName != 'Anonymous' ">
                <xsl:value-of select="udt:Title" />
              </xsl:if>

 
New Post
10/30/2009 1:24 PM
 

Thank you very much!

There's a lot for me to learn, begining with XSLT...

Ok, good. I am happy that solution exists.

 

 

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsDocumentsDocumentsHow to deny file downloads for unregistered users?How to deny file downloads for unregistered users?


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.