set role.id instead of role object to User, created Department object, Role.prototype.addCap