#1495|+Rashi|Changing rights from enum to class, all related refactorings. Include rightType in json with name.