Guests and Favorites Guests and Favorites
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Guests and Favorites

Started by gregik, August 24, 2004, 10:16:20 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

gregik

Hello!

How can I restrict guests to add files to Favorites?

Joachim Müller

those are client-sided favorites, nothing is done to your page. If you want to stop them from downloading the favorites as zip, edit zipdownload.php, findif ($CONFIG['enable_zipdownload'] != 1) {
//someone has entered the url manually, while the admin has disabled zipdownload
pageheader($lang_error);
starttable('-2', $lang_error);
print <<<EOT
<tr>
        <td align="center" class="tableb">
      {$lang_errors['perm_denied']}
      </td>
</tr>
EOT;
endtable();
pagefooter();
ob_end_flush();
} else {
and replace it with something like this (not tested though):if ($CONFIG['enable_zipdownload'] != 1) {
//someone has entered the url manually, while the admin has disabled zipdownload
pageheader($lang_error);
starttable('-2', $lang_error);
print <<<EOT
<tr>
        <td align="center" class="tableb">
      {$lang_errors['perm_denied']}
      </td>
</tr>
EOT;
endtable();
pagefooter();
ob_end_flush();
} elseif (!$USER){
//a guest tries to download, send him away
pageheader($lang_error);
starttable('-2', $lang_error);
print <<<EOT
<tr>
        <td align="center" class="tableb">
      You don't have permission to download your favorites as zip file. If you were registered and logged in, you would be able to do so. Why don't you <a href="register.php">register now</a>?
      </td>
</tr>
EOT;
endtable();
pagefooter();
ob_end_flush();
} else {


GauGau

gregik


Joachim Müller

issue solved then? Did the code I posted work for you?

GauGau

gregik

nope ... it does not work

I removed all cookies and still it downloads zip file