Removed the AccountGroup emailOnlyAuthors flag.

The functionality has been replaced with a global capability in
All-Projects project.config with the name emailReviewers. The
emailyOnlyAuthors groups will be listed with the deny permission in the
next change.

Change-Id: I67506956e2689c0840d4a37235c733d23fe1e7ad
This commit is contained in:
Colby Ranger
2012-04-10 14:27:06 -07:00
parent d9488f0c37
commit 74d093d93d
10 changed files with 19 additions and 82 deletions

View File

@@ -70,19 +70,7 @@ public abstract class ChangeEmail extends OutgoingEmail {
/** Is the from user in an email squelching group? */
final IdentifiedUser user = args.identifiedUserFactory.create(id);
if (!user.getCapabilities().canEmailReviewers()) {
emailOnlyAuthors = true;
} else {
// TODO(cranger): remove once the schema is migrated in the next patch.
final Set<AccountGroup.UUID> gids = user.getEffectiveGroups().getKnownGroups();
for (final AccountGroup.UUID gid : gids) {
AccountGroup group = args.groupCache.get(gid);
if (group != null && group.isEmailOnlyAuthors()) {
emailOnlyAuthors = true;
break;
}
}
}
emailOnlyAuthors = !user.getCapabilities().canEmailReviewers();
}
public void setPatchSet(final PatchSet ps) {