SOLVED: This can be achieved using the egit API's https://github.com/eclipse/egit-github/tree/master/org.eclipse.egit.github.core.
Basically the API's gives services like the RepositoryService, OrganizationService etc... using which we can see if a user has the necessary permissions.