Skip to content

Commit a210d41

Browse files
committed
#4748 Add user group icon to API key page
1 parent 40667f8 commit a210d41

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

stroom-core-client/src/main/java/stroom/security/client/presenter/ApiKeysListPresenter.java

+14
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import stroom.security.shared.FindApiKeyCriteria;
1818
import stroom.security.shared.HashedApiKey;
1919
import stroom.security.shared.QuickFilterExpressionParser;
20+
import stroom.security.shared.UserFields;
2021
import stroom.svg.client.Preset;
2122
import stroom.task.client.TaskMonitorFactory;
2223
import stroom.ui.config.client.UiConfigCache;
@@ -275,6 +276,19 @@ private void initTableColumns() {
275276
// Also don't show it if this screen has been set with a single owner
276277
if (securityContext.hasAppPermission(AppPermission.MANAGE_USERS_PERMISSION)
277278
&& owner == null) {
279+
dataGrid.addColumn(
280+
DataGridUtil.svgPresetColumnBuilder(false, (HashedApiKey row) ->
281+
UserAndGroupHelper.mapUserRefTypeToIcon(row.getOwner()))
282+
.withSorting(UserFields.FIELD_IS_GROUP)
283+
.centerAligned()
284+
.build(),
285+
DataGridUtil.headingBuilder("")
286+
.headingText(UserAndGroupHelper.buildUserAndGroupIconHeader())
287+
.centerAligned()
288+
.withToolTip("Whether this key is for a single user or a named user group.")
289+
.build(),
290+
(ColumnSizeConstants.ICON_COL * 2) + 20);
291+
278292
final Column<HashedApiKey, String> ownerColumn = DataGridUtil.textColumnBuilder(
279293
(HashedApiKey row) ->
280294
row.getOwner().toDisplayString())
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
* Issue **#4748** : Add user group icon to API key page.
2+
3+
4+
```sh
5+
# ********************************************************************************
6+
# Issue title: Add a User/Group type col to the Api Keys grid
7+
# Issue link: https://github.com/gchq/stroom/issues/4748
8+
# ********************************************************************************
9+
10+
# ONLY the top line will be included as a change entry in the CHANGELOG.
11+
# The entry should be in GitHub flavour markdown and should be written on a SINGLE
12+
# line with no hard breaks. You can have multiple change files for a single GitHub issue.
13+
# The entry should be written in the imperative mood, i.e. 'Fix nasty bug' rather than
14+
# 'Fixed nasty bug'.
15+
#
16+
# Examples of acceptable entries are:
17+
#
18+
#
19+
# * Issue **123** : Fix bug with an associated GitHub issue in this repository
20+
#
21+
# * Issue **namespace/other-repo#456** : Fix bug with an associated GitHub issue in another repository
22+
#
23+
# * Fix bug with no associated GitHub issue.
24+
```

0 commit comments

Comments
 (0)