Display the originator of each access rule
Added collumn to the access rights table showing the originating project for each access rule, makes it much easier to admin inherited projects and rules. Change-Id: Ic984e775e349939f3454b8f784c325cc132999ec
This commit is contained in:
@@ -64,6 +64,7 @@ public interface AdminConstants extends Constants {
|
|||||||
String columnProjectName();
|
String columnProjectName();
|
||||||
String columnGroupDescription();
|
String columnGroupDescription();
|
||||||
String columnProjectDescription();
|
String columnProjectDescription();
|
||||||
|
String columnRightOrigin();
|
||||||
String columnApprovalCategory();
|
String columnApprovalCategory();
|
||||||
String columnRightRange();
|
String columnRightRange();
|
||||||
String columnRefName();
|
String columnRefName();
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ columnProjectName = Project Name
|
|||||||
columnGroupDescription = Description
|
columnGroupDescription = Description
|
||||||
columnProjectDescription = Description
|
columnProjectDescription = Description
|
||||||
columnApprovalCategory = Category
|
columnApprovalCategory = Category
|
||||||
|
columnRightOrigin = Origin
|
||||||
columnRightRange = Permitted Range
|
columnRightRange = Permitted Range
|
||||||
columnRefName = Reference Name
|
columnRefName = Reference Name
|
||||||
|
|
||||||
|
|||||||
@@ -155,10 +155,11 @@ public class ProjectAccessScreen extends ProjectScreen {
|
|||||||
|
|
||||||
RightsTable() {
|
RightsTable() {
|
||||||
table.setWidth("");
|
table.setWidth("");
|
||||||
table.setText(0, 2, Util.C.columnApprovalCategory());
|
table.setText(0, 2, Util.C.columnRightOrigin());
|
||||||
table.setText(0, 3, Util.C.columnGroupName());
|
table.setText(0, 3, Util.C.columnApprovalCategory());
|
||||||
table.setText(0, 4, Util.C.columnRefName());
|
table.setText(0, 4, Util.C.columnGroupName());
|
||||||
table.setText(0, 5, Util.C.columnRightRange());
|
table.setText(0, 5, Util.C.columnRefName());
|
||||||
|
table.setText(0, 6, Util.C.columnRightRange());
|
||||||
|
|
||||||
final FlexCellFormatter fmt = table.getFlexCellFormatter();
|
final FlexCellFormatter fmt = table.getFlexCellFormatter();
|
||||||
fmt.addStyleName(0, 1, Gerrit.RESOURCES.css().iconHeader());
|
fmt.addStyleName(0, 1, Gerrit.RESOURCES.css().iconHeader());
|
||||||
@@ -166,6 +167,7 @@ public class ProjectAccessScreen extends ProjectScreen {
|
|||||||
fmt.addStyleName(0, 3, Gerrit.RESOURCES.css().dataHeader());
|
fmt.addStyleName(0, 3, Gerrit.RESOURCES.css().dataHeader());
|
||||||
fmt.addStyleName(0, 4, Gerrit.RESOURCES.css().dataHeader());
|
fmt.addStyleName(0, 4, Gerrit.RESOURCES.css().dataHeader());
|
||||||
fmt.addStyleName(0, 5, Gerrit.RESOURCES.css().dataHeader());
|
fmt.addStyleName(0, 5, Gerrit.RESOURCES.css().dataHeader());
|
||||||
|
fmt.addStyleName(0, 6, Gerrit.RESOURCES.css().dataHeader());
|
||||||
|
|
||||||
table.addClickHandler(new ClickHandler() {
|
table.addClickHandler(new ClickHandler() {
|
||||||
@Override
|
@Override
|
||||||
@@ -224,18 +226,19 @@ public class ProjectAccessScreen extends ProjectScreen {
|
|||||||
canDelete = true;
|
canDelete = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
table.setText(row, 2, ar != null ? ar.getCategory().getName()
|
table.setText(row, 2, right.getKey().getProjectNameKey().get());
|
||||||
|
table.setText(row, 3, ar != null ? ar.getCategory().getName()
|
||||||
: right.getApprovalCategoryId().get() );
|
: right.getApprovalCategoryId().get() );
|
||||||
|
|
||||||
if (group != null) {
|
if (group != null) {
|
||||||
table.setWidget(row, 3, new Hyperlink(group.getName(), Dispatcher
|
table.setWidget(row, 4, new Hyperlink(group.getName(), Dispatcher
|
||||||
.toAccountGroup(group.getId())));
|
.toAccountGroup(group.getId())));
|
||||||
} else {
|
} else {
|
||||||
table.setText(row, 3, Util.M.deletedGroup(right.getAccountGroupId()
|
table.setText(row, 4, Util.M.deletedGroup(right.getAccountGroupId()
|
||||||
.get()));
|
.get()));
|
||||||
}
|
}
|
||||||
|
|
||||||
table.setText(row, 4, right.getRefPatternForDisplay());
|
table.setText(row, 5, right.getRefPatternForDisplay());
|
||||||
|
|
||||||
{
|
{
|
||||||
final SafeHtmlBuilder m = new SafeHtmlBuilder();
|
final SafeHtmlBuilder m = new SafeHtmlBuilder();
|
||||||
@@ -248,7 +251,7 @@ public class ProjectAccessScreen extends ProjectScreen {
|
|||||||
m.br();
|
m.br();
|
||||||
}
|
}
|
||||||
formatValue(m, right.getMaxValue(), max);
|
formatValue(m, right.getMaxValue(), max);
|
||||||
SafeHtml.set(table, row, 5, m);
|
SafeHtml.set(table, row, 6, m);
|
||||||
}
|
}
|
||||||
|
|
||||||
final FlexCellFormatter fmt = table.getFlexCellFormatter();
|
final FlexCellFormatter fmt = table.getFlexCellFormatter();
|
||||||
@@ -257,7 +260,8 @@ public class ProjectAccessScreen extends ProjectScreen {
|
|||||||
fmt.addStyleName(row, 3, Gerrit.RESOURCES.css().dataCell());
|
fmt.addStyleName(row, 3, Gerrit.RESOURCES.css().dataCell());
|
||||||
fmt.addStyleName(row, 4, Gerrit.RESOURCES.css().dataCell());
|
fmt.addStyleName(row, 4, Gerrit.RESOURCES.css().dataCell());
|
||||||
fmt.addStyleName(row, 5, Gerrit.RESOURCES.css().dataCell());
|
fmt.addStyleName(row, 5, Gerrit.RESOURCES.css().dataCell());
|
||||||
fmt.addStyleName(row, 5, Gerrit.RESOURCES.css()
|
fmt.addStyleName(row, 6, Gerrit.RESOURCES.css().dataCell());
|
||||||
|
fmt.addStyleName(row, 6, Gerrit.RESOURCES.css()
|
||||||
.projectAdminApprovalCategoryRangeLine());
|
.projectAdminApprovalCategoryRangeLine());
|
||||||
|
|
||||||
setRowItem(row, right);
|
setRowItem(row, right);
|
||||||
|
|||||||
Reference in New Issue
Block a user