I work on a system where people can create their own content and share it internally with their colleagues. I am creating a method of organizing favorite or most recently used items into collections as a way to personally organize the items that you create and consume. I was wondering if we should prevent users from giving multiple collections the same name.
I think it largely depends on how you intend to use the collections and more importantly display the list to users.
If collections have the same name, you need another value to distinguish them. I would suggest perhaps "created by" will suffice for this.
With that in mind, I strongly suggest you ensure that collection names are at least unique to each user (that created them).
The decision of making them unique system-wide though is going to have to be one you make yourself based on your evaluation of how the system will be used. Perhaps a starting point for your decision is as follows:
If collections are mostly private, and rarely shared - then make them unique to the user creating them.
If collections are rarely private, and mostly shared -then make them unique on a system-wide level.
I important consideration though. If you don't make them unique system-wide from the start, then it will be more complex to change that later.
Where as, if you start with them unique system-wide and later find the requirements need to change (because users are getting annoyed that it's too restrictive) then it's easy to switch over.
So perhaps follow this logic if you really can't make your mind up which is better.