Allowed owners to give their characters to new owners, no UI yet.

This commit is contained in:
Stefan Zermatten
2018-08-28 09:59:10 +02:00
parent 41c90bb69f
commit 74c6a423ee

View File

@@ -583,7 +583,7 @@ Characters.allow({
Characters.deny({ Characters.deny({
update: function(userId, docs, fields, modifier) { update: function(userId, docs, fields, modifier) {
// can't change owners // can't change owners unless you are the current owner
return _.contains(fields, "owner"); return _.contains(fields, "owner") && doc.owner !== userId;
} }
}); });