Affects Version/s: 7.0.X EE, Master
The VerifyPermission#fixOrganizationRolePermissions uses a DynamicQuery to fetch all the Organization ResourcePermissions into a single List. If someone has many organizations in their portal, you can imagine that this would cause an OutOfMemoryError. We should use an ActionableDynamicQuery instead.
Steps to Reproduce
1. Start up the portal and log in as the admin user.
2. Add many organizations to your portal (500,000 would probably be sufficient).
3. Shut down the portal.
4. Add the following lines to your portal-ext.properties file:
5. Start up the portal.
Expected Result: The portal starts up successfully with no errors.
Actual Result: The portal fails to start up due to an OutOfMemoryError.