Add #absentUser() to ForProject, ForRef and ForChange
We used to think adding this method to the top level is enough and could avoid misuses. But it turns out we still need them in other permission backend classes so that we only need to rescope a user when necessary, which could provide better performance. See I67b72b59 as an example. Change-Id: I9ef30fb38315250fa63fb8b3d27e19e19d5e3e22
This commit is contained in:
@@ -79,8 +79,8 @@ public class DefaultPermissionBackend extends PermissionBackend {
|
||||
}
|
||||
|
||||
@Override
|
||||
public WithUser absentUser(Account.Id user) {
|
||||
IdentifiedUser identifiedUser = identifiedUserFactory.create(checkNotNull(user, "user"));
|
||||
public WithUser absentUser(Account.Id id) {
|
||||
IdentifiedUser identifiedUser = identifiedUserFactory.create(checkNotNull(id, "user"));
|
||||
return new WithUserImpl(identifiedUser);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user