check permission function added to user model