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.054 seconds

Your client support is really awesome + rich and powerfull software.
foo42 (Forum)

Get Started