-
Type:
Bug
-
Status: Closed
-
Resolution: Fixed
-
Affects Version/s: 7.0.X EE, Master
-
Fix Version/s: 7.0.0 DXP FP22, 7.0.0 DXP SP4, 7.0.4 CE GA5
-
Component/s: Core Infrastructure > Upgrade Framework
-
Fix Priority:3
-
Git Pull Request:
Currently we run the following query in order to find out what layouts are missing permissions.
SELECT {Layout.*} FROM Layout LEFT JOIN ResourcePermission ON (ResourcePermission.companyId = Layout.companyId) AND (ResourcePermission.name = ?) AND (ResourcePermission.scope = ?) AND (ResourcePermission.primKeyId = Layout.plid) AND (ResourcePermission.roleId = ?) WHERE ResourcePermission.primKeyId IS NULL
However, the roleId we use is specific to a companyId, and so any Layout in a portal instance that is different from the one we are checking will return from this query.
As a result, even if a layout has permissions for the specified role, they will still come back from this query. However, since they won't actually need any updates, this results in potentially hundreds of thousands of fetches that result in no work being accomplished.