Use AccountGroup.UUID instead of Account.Id

By switching to the UUID we can have a globally unique identifier
for group membership throughout the server, even if group information
comes in from a different data source.

Change-Id: Icb49d6a6aff8e62864ac0f78ceedbe03f01de894
Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
Shawn O. Pearce
2010-12-21 12:33:12 -08:00
parent bcc191c020
commit e662fb3d4d
49 changed files with 374 additions and 229 deletions

View File

@@ -36,21 +36,21 @@ public class PeerDaemonUser extends CurrentUser {
PeerDaemonUser create(@Assisted SocketAddress peer);
}
private final Set<AccountGroup.Id> effectiveGroups;
private final Set<AccountGroup.UUID> effectiveGroups;
private final SocketAddress peer;
@Inject
protected PeerDaemonUser(AuthConfig authConfig, @Assisted SocketAddress peer) {
super(AccessPath.SSH_COMMAND, authConfig);
final HashSet<AccountGroup.Id> g = new HashSet<AccountGroup.Id>();
final HashSet<AccountGroup.UUID> g = new HashSet<AccountGroup.UUID>();
g.add(authConfig.getAdministratorsGroup());
this.effectiveGroups = Collections.unmodifiableSet(g);
this.peer = peer;
}
@Override
public Set<AccountGroup.Id> getEffectiveGroups() {
public Set<AccountGroup.UUID> getEffectiveGroups() {
return effectiveGroups;
}