[lib][web] Extract logic checking add users permissions
Summary: This can be reused on native
Test Plan: tested that in members modal the "Add members" button is displayed when it is supposed to and navigates to proper modals
Reviewers: tomek
Reviewed By: tomek
Subscribers: ashoat
Differential Revision: https://phab.comm.dev/D12309