fixing bug #3974, add a case when user is the manager of the resource
update junit test to take this case into account.