Explaining why we check for no metadata

This commit is contained in:
Fabien O'Carroll 2014-01-17 14:29:46 +00:00 committed by Remy Sharp
parent 804b287afc
commit 2875ff3f2b

View File

@ -31,7 +31,10 @@ var model = {
}.bind(this));
},
isVisible: function (bin, username) {
if (!bin.metadata) { // bin does not exist yet, it cannot be private
// This will only occur if it isn't a real bin, it has been created
// on from default files and does not exist in any database. By this
// logic the bin must be public, it has no owner and no record.
if (!bin.metadata) {
return true;
}
// this should only let users see the latest