Added authorization logic to user model which was basically a definition of the type method. It will be used in the cancan ability model