version update: affects 5.1.8 and 5.2.2
Currently, in order to share a filter or dashboard with a specific project role, the user must be in that project role. This means that a project administrator cannot create shared items for a project role unless they are also in that project role.
This should also apply to groups. Currently, a user can only share filters with groups that they're a member of. This should respect the 'Browse Users' global permission and if the user has this permission show all groups in the system.