We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit d59af029 authored by Evan Prodromou's avatar Evan Prodromou

disallow email on faves from sandboxed users

parent 05ff8925
......@@ -697,6 +697,7 @@ class Profile extends Memcached_DataObject
case Right::PUBLICNOTICE:
case Right::EMAILONREPLY:
case Right::EMAILONSUBSCRIBE:
case Right::EMAILONFAVE:
$result = !$this->isSandboxed();
break;
default:
......
......@@ -546,6 +546,10 @@ function mail_notify_message($message, $from=null, $to=null)
function mail_notify_fave($other, $user, $notice)
{
if (!$user->hasRight(Right::EMAILONFAVE)) {
return;
}
$profile = $user->getProfile();
$bestname = $profile->getBestName();
......
......@@ -56,5 +56,6 @@ class Right
const SUBSCRIBE = 'subscribe';
const EMAILONREPLY = 'emailonreply';
const EMAILONSUBSCRIBE = 'emailonsubscribe';
const EMAILONFAVE = 'emailonfave';
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment