you have to get the user groups - ie. what are the Groups the user has assigned (like admin, content-authors, template-editor) etc.
Based on the Group privileges / Permissions, you can find the user replicate access or not.Find the group.
If you want to explicitly find only Replicate try like this:
...