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

@@ -122,7 +122,6 @@ public interface GerritCss extends CssResource {
String groupNamePanel();
String groupNameTextBox();
String groupOptionsPanel();
String groupOptionsNotificationsDescriptionPanel();
String groupOwnerPanel();
String groupOwnerTextBox();
String groupTypePanel();

View File

@@ -70,9 +70,7 @@ public class AccountGroupInfoScreen extends AccountGroupScreen {
private Button externalNameSearch;
private Grid externalMatches;
private Panel groupOptionsPanel;
private CheckBox visibleToAllCheckBox;
private CheckBox emailOnlyAuthors;
private Button saveGroupOptions;
public AccountGroupInfoScreen(final GroupDetail toShow, final String token) {
@@ -100,7 +98,6 @@ public class AccountGroupInfoScreen extends AccountGroupScreen {
externalNameFilter.setEnabled(canModify);
externalNameSearch.setEnabled(canModify);
visibleToAllCheckBox.setEnabled(canModify);
emailOnlyAuthors.setEnabled(canModify);
}
private void initUUID() {
@@ -207,20 +204,14 @@ public class AccountGroupInfoScreen extends AccountGroupScreen {
}
private void initGroupOptions() {
groupOptionsPanel = new VerticalPanel();
groupOptionsPanel.setStyleName(Gerrit.RESOURCES.css().groupOptionsPanel());
groupOptionsPanel.add(new SmallHeading(Util.C.headingGroupOptions()));
visibleToAllCheckBox = new CheckBox(Util.C.isVisibleToAll());
groupOptionsPanel.add(visibleToAllCheckBox);
emailOnlyAuthors = new CheckBox(Util.C.emailOnlyAuthors());
final VerticalPanel groupOptionsPanel = new VerticalPanel();
final VerticalPanel vp = new VerticalPanel();
vp.setStyleName(Gerrit.RESOURCES.css()
.groupOptionsNotificationsDescriptionPanel());
vp.add(new Label(Util.C.descriptionNotifications()));
vp.add(emailOnlyAuthors);
vp.setStyleName(Gerrit.RESOURCES.css().groupOptionsPanel());
vp.add(new SmallHeading(Util.C.headingGroupOptions()));
visibleToAllCheckBox = new CheckBox(Util.C.isVisibleToAll());
vp.add(visibleToAllCheckBox);
groupOptionsPanel.add(vp);
saveGroupOptions = new Button(Util.C.buttonSaveGroupOptions());
@@ -229,8 +220,7 @@ public class AccountGroupInfoScreen extends AccountGroupScreen {
@Override
public void onClick(final ClickEvent event) {
final GroupOptions groupOptions =
new GroupOptions(visibleToAllCheckBox.getValue(),
emailOnlyAuthors.getValue());
new GroupOptions(visibleToAllCheckBox.getValue());
Util.GROUP_SVC.changeGroupOptions(getGroupId(), groupOptions,
new GerritCallback<VoidResult>() {
public void onSuccess(final VoidResult result) {
@@ -245,7 +235,6 @@ public class AccountGroupInfoScreen extends AccountGroupScreen {
final OnEditEnabler enabler = new OnEditEnabler(saveGroupOptions);
enabler.listenTo(visibleToAllCheckBox);
enabler.listenTo(emailOnlyAuthors);
}
private void initGroupType() {
@@ -460,7 +449,6 @@ public class AccountGroupInfoScreen extends AccountGroupScreen {
descTxt.setText(group.getDescription());
visibleToAllCheckBox.setValue(group.isVisibleToAll());
emailOnlyAuthors.setValue(group.isEmailOnlyAuthors());
switch (group.getType()) {
case LDAP:

View File

@@ -44,8 +44,6 @@ public interface AdminConstants extends Constants {
String requireChangeID();
String headingGroupOptions();
String isVisibleToAll();
String emailOnlyAuthors();
String descriptionNotifications();
String buttonSaveGroupOptions();
String suggestedGroupLabel();
String parentSuggestions();

View File

@@ -29,9 +29,6 @@ headingParentProjectName = Rights Inherit From
parentSuggestions = Parent Suggestion
columnProjectName = Project Name
emailOnlyAuthors = Authors
descriptionNotifications = Send email notifications about comments and actions by users in this group only to:
headingGroupUUID = Group UUID
headingOwner = Owners
headingDescription = Description

View File

@@ -32,6 +32,8 @@ import java.util.List;
public class GroupTable extends NavigationTable<AccountGroup> {
private static final int NUM_COLS = 5;
private final boolean enableLink;
public GroupTable(final boolean enableLink) {
@@ -52,8 +54,7 @@ public class GroupTable extends NavigationTable<AccountGroup> {
table.setText(0, 2, Util.C.columnGroupDescription());
table.setText(0, 3, Util.C.headingOwner());
table.setText(0, 4, Util.C.columnGroupType());
table.setText(0, 5, Util.C.columnGroupNotifications());
table.setText(0, 6, Util.C.columnGroupVisibleToAll());
table.setText(0, 5, Util.C.columnGroupVisibleToAll());
table.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
@@ -66,12 +67,9 @@ public class GroupTable extends NavigationTable<AccountGroup> {
});
final FlexCellFormatter fmt = table.getFlexCellFormatter();
fmt.addStyleName(0, 1, Gerrit.RESOURCES.css().dataHeader());
fmt.addStyleName(0, 2, Gerrit.RESOURCES.css().dataHeader());
fmt.addStyleName(0, 3, Gerrit.RESOURCES.css().dataHeader());
fmt.addStyleName(0, 4, Gerrit.RESOURCES.css().dataHeader());
fmt.addStyleName(0, 5, Gerrit.RESOURCES.css().dataHeader());
fmt.addStyleName(0, 6, Gerrit.RESOURCES.css().dataHeader());
for (int i = 1; i <= NUM_COLS; i++) {
fmt.addStyleName(0, i, Gerrit.RESOURCES.css().dataHeader());
}
}
@Override
@@ -107,21 +105,15 @@ public class GroupTable extends NavigationTable<AccountGroup> {
table.setText(row, 2, k.getDescription());
table.setText(row, 3, detail.ownerGroup.getName());
table.setText(row, 4, k.getType().toString());
if (k.isEmailOnlyAuthors()) {
table.setWidget(row, 5, new Image(Gerrit.RESOURCES.greenCheck()));
}
if (k.isVisibleToAll()) {
table.setWidget(row, 6, new Image(Gerrit.RESOURCES.greenCheck()));
table.setWidget(row, 5, new Image(Gerrit.RESOURCES.greenCheck()));
}
final FlexCellFormatter fmt = table.getFlexCellFormatter();
fmt.addStyleName(row, 1, Gerrit.RESOURCES.css().dataCell());
fmt.addStyleName(row, 1, Gerrit.RESOURCES.css().groupName());
fmt.addStyleName(row, 2, Gerrit.RESOURCES.css().dataCell());
fmt.addStyleName(row, 3, Gerrit.RESOURCES.css().dataCell());
fmt.addStyleName(row, 4, Gerrit.RESOURCES.css().dataCell());
fmt.addStyleName(row, 5, Gerrit.RESOURCES.css().dataCell());
fmt.addStyleName(row, 6, Gerrit.RESOURCES.css().dataCell());
for (int i = 1; i <= NUM_COLS; i++) {
fmt.addStyleName(row, i, Gerrit.RESOURCES.css().dataCell());
}
setRowItem(row, k);
}

View File

@@ -1310,10 +1310,6 @@ a:hover.downloadLink {
margin-bottom: 2px;
}
.groupOptionsPanel {
margin-bottom: 3px;
}
.groupOptionsNotificationsDescriptionPanel {
margin-top: 5px;
margin-bottom: 5px;
}
.groupOwnerPanel {