This is a quote from the book "The ​Virtue Of Selfishness" by Ayn Rand
... rational self-interest. But his right to do so is derived from his nature as man and from the function of moral values in human life — and, therefore, is applicable only in the context of a r ational, objectively demonstrated and validated code of moral principles which define and determine his actual self-interest. It is not a license “to do as he pleases” and it is not applicab le to the altruists’ image of a “selfish” brute nor to any man motivated by irrational emotions, feelings, urges, wishes or whims.

This is said as a warning against the kind ...
read full book block explorer