Commit 035acc2c authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Fix query for group view access


Signed-off-by: default avatarRichard Mansfield <richardm@catalyst.net.nz>
parent c501d655
...@@ -2920,7 +2920,7 @@ class View { ...@@ -2920,7 +2920,7 @@ class View {
AND (va.startdate IS NULL OR va.startdate < current_timestamp) AND (va.startdate IS NULL OR va.startdate < current_timestamp)
AND (va.stopdate IS NULL OR va.stopdate > current_timestamp) AND (va.stopdate IS NULL OR va.stopdate > current_timestamp)
AND (va.accesstype IN ('public', 'loggedin', 'friends') AND (va.accesstype IN ('public', 'loggedin', 'friends')
OR va.usr = ? OR va.token IS NOT NULL OR va.group IS NOT NULL) OR va.usr = ? OR va.token IS NOT NULL OR gm.member IS NOT NULL)
ORDER BY va.token IS NULL DESC, va.accesstype != 'friends' DESC", ORDER BY va.token IS NULL DESC, va.accesstype != 'friends' DESC",
array($userid, $viewid, $userid) array($userid, $viewid, $userid)
); );
......
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