determine user's right