Affects Version/s: 7.1.X, 7.2.X, Master
Component/s: User Management > Users & Organizations
Steps to reproduce:
1. Login as admin user
2. Create an organization "Parent."
3. Create a sub organization "Child" that is the child of the organization created in step 2.
4. Go to Roles section and create a custom Organization Role
5. Give the organization role "Manage Suborganizations" permission under Users and Organizations section. For testing purposes, give full permission under Users and Organizations > Resource Permissions > Organizations.
6. Assign the role to a user in the portal
7. Assign the same user to the "Parent" organization created in step 2.
8. Login as the user with the custom role created in #2 ~ #3
9. Go to the Users & Organizations > Organizations tab
10. Observe only organizations that the logged-in user is a member/owner of are showing
11. Search sub-org name. Observe that sub-org is not returning in the search result
12. Repeat the same process as a portal admin and observe the search result is coming back with proper result
The user with the custom Organization Role would be able to view "Child Organization" in the search since they are a manager of that suborganization.
The user is unable to view "Child Organiztion" after searching for it.
Reproduced in Branch: 2f38edaacb65cf233ebc1f3cda59f92dfd2ec85b
Reproduced in Master: 52b997396c42fa102a7d850d5f3521d63377423c