Bug fix: sudo with id's as strings

-Stings of id's used for sudo would get compaired against the user's int id before being unmarshelled. Extracted the identifier retrival so it should only be done once

GITLAB-337 (GITLAB-321)

Change-Id: I5fa9cfd866d88f068f6dc4e62c9a644683e87b73