implementation of role in user-mgr.c