check permission in context