Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

Download path 21 Feb 2012 02:02 #1415

Hello
Is there a possibility to protect downloads (links) from not registered users?

any ideas?

Thanks

Please Log in or Create an account to join the conversation.

Last edit: by admin.

Re: Download path 21 Feb 2012 13:33 #1420

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
Not possible for the moment, but you can do it easily :

-> First, wich ACL ?
you can create a new ACL (core.download) and affect authorizations for your members.

-> Then, protect visibility
In whatever JDom calls, you can always protect view of element :

ex :
<?php echo JDom::_('html.fly.file', array(
	'dataKey' => 'my_image',
	'dataObject' => $row,
	'target' => 'download',
...

	'aclAccess' => 'core.download'			// ADD ACL HERE  core.download must exist

								));
?>

But you only protect the view of it, wich is maybe not what you want.
-> It hide the image
-> It doesn't physically protect the against download if the user know the URL to download

So ...

If you want to see the image without link :
(in this example, if the user cannot download, the link open modal. You can replace 'modal' to '' to avoid it)
<?php echo JDom::_('html.fly.file', array(
	'dataKey' => 'my_image',
	'dataObject' => $row,
...
	'target' => ($this->access->get('core.download')?'download':'modal')
								));
?>


And now, if you want to protect pysically the download, you must add some ACL checks in your classes/files file.

Because I prefer you try to do it by yourself to learn how it works, please post here the end of the solution you found.

TODO ...

If you don't find the answer, I give you the answer.
Coding is now a piece of cake

Please Log in or Create an account to join the conversation.

Last edit: by admin.
  • Page:
  • 1
Time to create page: 0.170 seconds

  I found "cook" two days ago. Played around with it for a day and then within a day got rid of two legacy applications in IBM Lotus Domino Notes and replaced them with "cook". It was really easy. A piece of cake. Actually it was even easier than cooking. Cooking involves more work than developing with "cook". What can I say about "cook"? Great application great price for what it delivers great forum with a lot of information and fast responses active and friendly community fast forward moving development cycle So what should I say "Monsieur Le Cook"? Keep the good work going it will lead to success. Having become a paying member in the words of Edith Piaf may I say ..... non rien de rien ... je ne regrette rien. Vive La France.
FK (JED)
         

Get Started