fix NPE when a user is deleted
BS-9088, fix exception while publishing a organization after adding a new user
fix NPE when a group is deleted
fix NPE when a role is deleted