Is it better to display
a positive informative message "You can only view and share links of icons. for additional options please login"
or negative informative message "Downloading, Uploading or Requesting icons is not allowed. Please login"
User Experience Stack Exchange is a question and answer site for user experience researchers and experts. It only takes a minute to sign up.Sign up to join this community
It's always better to be positive.
Your first example is good, because not only does it indicate that the attempted action cannot be done, but it gives added value by letting the user know what they can do, thus adding value and helping discoverability.
The second example, not only says you can't do what you're trying but there's also a bunch of other stuff you can't do either, which while it first appears to add informational value, is actually piling on the negativity, making it seem like you can't actually do anything and that will frustrate users.
I would enhance the first option by including a positive thing about the action the user is trying to do - to confirm that they will indeed be able to do that - just to avoid any uncertainty, and to further promote the positive affect of logging in and connecting that with their desired action:
"Sorry, you can only view and share links of icons. For additional options, including download, please log in."
For most situations, you should stick to positive messages. They focus on what you can do and achieve more than what you can't, and so leave less of a negative impression.
However, there are times where negative messages are better. In particular, when the list of what you can do is too long and complicated when compared to what you can't do. Shorter messages are usually preferable to longer ones, and so here you have to balance the message length and clarity against the wish to be positive.
"You can only open this safe on Mondays, Tuesdays, Thursdays, Fridays, Saturdays, and Sundays"
"You can't open this lock on Wednesdays"
"You only have permission to delete accounts for publishers, editors, printers, readers, subscribers, and copywriters."
You do not have permission to delete administrator accounts.