Only copy the user on bug reports if the user can access the dataset.

This commit is contained in:
Daniel Blankenberg
2012-10-11 14:06:18 -04:00
parent ad9bb6382b
commit 25b0df92e9
@@ -248,7 +248,7 @@ class DatasetInterface( BaseUIController, UsesAnnotations, UsesHistoryMixin, Use
# Check email a bit
email = email.strip()
parts = email.split()
if len( parts ) == 1 and len( email ) > 0:
if len( parts ) == 1 and len( email ) > 0 and trans.app.security_agent.can_access_dataset( trans.get_current_user_roles(), hda.dataset ):
to = to_address + ", " + email
else:
to = to_address