delving/culture-hub — comment on commit 769826ca9f57a050b8b82be48e172a70e3b95eeb
File:  line 0
By manuelbernhardt:

We need to run this evolution on all deployments:

var tgt = function(value) {
if(value == 0) return "view"
if(value == 10) return "modify"
if(value == 30) return "cms"
if(value == 42) return "own"
}
db.Groups.find().forEach(function(it) { it.grantType = tgt(it.grantType.value); db.Groups.save(it); })