Commit a656bec0 authored by Hugh Davenport's avatar Hugh Davenport
Browse files

Non logged in users shouldn't get edit option



This happens on public site pages because the view
owner is 0 by default, and the LiveUser object has
id 0.

Bug #778240

Change-Id: Idec3fe8f4a9a877eaf02bfb304f1809f6b556ab0
Signed-off-by: default avatarHugh Davenport <hugh@catalyst.net.nz>
parent aece6859
......@@ -877,7 +877,7 @@ class User {
public function can_edit_view($v) {
$owner = $v->get('owner');
if ($owner == $this->get('id')) {
if ($owner > 0 && $owner == $this->get('id')) {
return true;
}
$institution = $v->get('institution');
......
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