mirror of
https://github.com/silverstripe/silverstripe-subsites
synced 2024-10-22 09:05:55 +00:00
Merge pull request #278 from DarrenInwood/sql-update
Update SQL to remove ambiguity
This commit is contained in:
commit
6225b2d680
@ -488,7 +488,7 @@ class Subsite extends DataObject
|
||||
INNER JOIN \"Group\" ON \"Group\".\"ID\" = \"Permission\".\"GroupID\" AND \"Group\".\"AccessAllSubsites\" = 1
|
||||
INNER JOIN \"Group_Members\" ON \"Group_Members\".\"GroupID\" = \"Permission\".\"GroupID\"
|
||||
WHERE \"Permission\".\"Code\" IN ('$SQL_perms')
|
||||
AND \"MemberID\" = {$memberID}
|
||||
AND \"Group_Members\".\"MemberID\" = {$memberID}
|
||||
")->value();
|
||||
|
||||
// Count this user's groups which have a role that can access the main site
|
||||
@ -501,7 +501,7 @@ class Subsite extends DataObject
|
||||
INNER JOIN \"PermissionRoleCode\" ON \"PermissionRole\".\"ID\"=\"PermissionRoleCode\".\"RoleID\"
|
||||
WHERE \"PermissionRoleCode\".\"Code\" IN ('$SQL_perms')
|
||||
AND \"Group\".\"AccessAllSubsites\" = 1
|
||||
AND \"MemberID\" = {$memberID}
|
||||
AND \"Group_Members\".\"MemberID\" = {$memberID}
|
||||
")->value();
|
||||
|
||||
// There has to be at least one that allows access.
|
||||
|
Loading…
x
Reference in New Issue
Block a user