Skip to content

Commit

Permalink
Merge branch '7.6' of github.com:gchq/stroom
Browse files Browse the repository at this point in the history
  • Loading branch information
stroomdev66 committed Nov 4, 2024
2 parents 5adb74e + ae24f38 commit cda7a25
Show file tree
Hide file tree
Showing 9 changed files with 150 additions and 165 deletions.
14 changes: 13 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,17 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
DO NOT ADD CHANGES HERE - ADD THEM USING log_change.sh
~~~


## [v7.6-beta.4] - 2024-11-04

* Issue **#4550** : Fix datasource already in use issue.

* Uplift docker image JDK to `eclipse-temurin:21.0.5_11-jdk-alpine`.

* Issue **#4580** : Auto add a permission user when an account is created.

* Issue **#4582** : Show all users by default and not just ones with explicit permissions.

* Issue **#4562** : Use Zip64 compatibility mode.

* Issue **#4564** : Use expression as column name.
Expand Down Expand Up @@ -936,7 +947,8 @@ DO NOT ADD CHANGES HERE - ADD THEM USING log_change.sh
* Issue **#3830** : Add S3 data storage option.


[Unreleased]: https://github.com/gchq/stroom/compare/v7.6-beta.3...HEAD
[Unreleased]: https://github.com/gchq/stroom/compare/v7.6-beta.4...HEAD
[v7.6-beta.4]: https://github.com/gchq/stroom/compare/v7.6-beta.3...v7.6-beta.4
[v7.6-beta.3]: https://github.com/gchq/stroom/compare/v7.6-beta.2...v7.6-beta.3
[v7.6-beta.2]: https://github.com/gchq/stroom/compare/v7.6-beta.1...v7.6-beta.2
[v7.6-beta.1]: https://github.com/gchq/stroom/compare/v7.5-beta.9...v7.6-beta.1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
package stroom.security.client.presenter;

import stroom.content.client.presenter.ContentTabPresenter;
import stroom.dispatch.client.RestFactory;
import stroom.explorer.client.presenter.DocSelectionPopup;
import stroom.security.client.presenter.AppPermissionsPresenter.AppPermissionsView;
import stroom.security.shared.AppUserPermissions;
import stroom.svg.client.SvgPresets;
Expand All @@ -36,37 +34,32 @@
public class AppPermissionsPresenter
extends ContentTabPresenter<AppPermissionsView> {

private final RestFactory restFactory;
private final Provider<AppPermissionsEditPresenter> appPermissionsChangePresenterProvider;
private final AppUserPermissionsListPresenter appUserPermissionsListPresenter;
private final Provider<DocSelectionPopup> docSelectionPopupProvider;

private final ButtonView edit;
private final InlineSvgToggleButton showAllToggleButton;
private final InlineSvgToggleButton explicitOnly;

@Inject
public AppPermissionsPresenter(
final EventBus eventBus,
final AppPermissionsView view,
final RestFactory restFactory,
final AppUserPermissionsListPresenter appUserPermissionsListPresenter,
final Provider<AppPermissionsEditPresenter> appPermissionsChangePresenterProvider,
final Provider<DocSelectionPopup> docSelectionPopupProvider) {
final Provider<AppPermissionsEditPresenter> appPermissionsChangePresenterProvider) {

super(eventBus, view);
this.restFactory = restFactory;
this.appPermissionsChangePresenterProvider = appPermissionsChangePresenterProvider;
this.appUserPermissionsListPresenter = appUserPermissionsListPresenter;
this.docSelectionPopupProvider = docSelectionPopupProvider;
view.setPermissionsView(appUserPermissionsListPresenter.getView());

edit = appUserPermissionsListPresenter.addButton(SvgPresets.EDIT);

showAllToggleButton = new InlineSvgToggleButton();
showAllToggleButton.setSvg(SvgImage.EYE);
showAllToggleButton.setTitle("Show Users Without Explicit Permissions");
showAllToggleButton.setState(false);
appUserPermissionsListPresenter.addButton(showAllToggleButton);
explicitOnly = new InlineSvgToggleButton();
explicitOnly.setSvg(SvgImage.EYE_OFF);
explicitOnly.setTitle("Only Show Users With Explicit Permissions");
explicitOnly.setState(false);
appUserPermissionsListPresenter.addButton(explicitOnly);
appUserPermissionsListPresenter.setAllUsers(!explicitOnly.getState());
}

@Override
Expand All @@ -80,15 +73,15 @@ protected void onBind() {
}
}));
registerHandler(edit.addClickHandler(e -> editPermissions()));
registerHandler(showAllToggleButton.addClickHandler(e -> {
if (showAllToggleButton.getState()) {
showAllToggleButton.setTitle("Hide Users Without Explicit Permissions");
showAllToggleButton.setSvg(SvgImage.EYE_OFF);
registerHandler(explicitOnly.addClickHandler(e -> {
if (explicitOnly.getState()) {
explicitOnly.setTitle("Show All Users");
explicitOnly.setSvg(SvgImage.EYE);
} else {
showAllToggleButton.setTitle("Show Users Without Explicit Permissions");
showAllToggleButton.setSvg(SvgImage.EYE);
explicitOnly.setTitle("Only Show Users With Explicit Permissions");
explicitOnly.setSvg(SvgImage.EYE_OFF);
}
appUserPermissionsListPresenter.setAllUsers(showAllToggleButton.getState());
appUserPermissionsListPresenter.setAllUsers(!explicitOnly.getState());
appUserPermissionsListPresenter.refresh();
}));
}
Expand All @@ -98,8 +91,8 @@ private void editPermissions() {
if (appUserPermissions != null) {
final AppPermissionsEditPresenter appPermissionsChangePresenter =
appPermissionsChangePresenterProvider.get();
appPermissionsChangePresenter.show(appUserPermissions.getUserRef(), () ->
appUserPermissionsListPresenter.refresh());
appPermissionsChangePresenter.show(appUserPermissions.getUserRef(),
appUserPermissionsListPresenter::refresh);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,15 @@

package stroom.security.client.presenter;

import stroom.dispatch.client.RestFactory;
import stroom.docref.HasDisplayValue;
import stroom.security.client.presenter.CreateUserPresenter.CreateUserView;
import stroom.security.shared.User;
import stroom.security.shared.UserResource;
import stroom.ui.config.client.UiConfigCache;
import stroom.widget.popup.client.event.DialogEvent;
import stroom.widget.popup.client.event.ShowPopupEvent;
import stroom.widget.popup.client.presenter.PopupSize;
import stroom.widget.popup.client.presenter.PopupType;

import com.google.gwt.core.client.GWT;
import com.google.inject.Inject;
import com.google.web.bindery.event.shared.EventBus;
import com.gwtplatform.mvp.client.HasUiHandlers;
Expand All @@ -40,28 +37,23 @@

public class CreateUserPresenter extends MyPresenterWidget<CreateUserView> implements CreateUserUiHandlers {

private static final UserResource USER_RESOURCE = GWT.create(UserResource.class);

private final CreateNewGroupPresenter createNewGroupPresenter;
private final CreateExternalUserPresenter createNewUserPresenter;
private final CreateMultipleUsersPresenter createMultipleUsersPresenter;
private final UiConfigCache uiConfigCache;
private final RestFactory restFactory;

@Inject
public CreateUserPresenter(final EventBus eventBus,
final CreateUserView view,
final CreateNewGroupPresenter createNewGroupPresenter,
final CreateExternalUserPresenter createNewUserPresenter,
final CreateMultipleUsersPresenter createMultipleUsersPresenter,
final UiConfigCache uiConfigCache,
final RestFactory restFactory) {
final UiConfigCache uiConfigCache) {
super(eventBus, view);
this.createNewGroupPresenter = createNewGroupPresenter;
this.createNewUserPresenter = createNewUserPresenter;
this.createMultipleUsersPresenter = createMultipleUsersPresenter;
this.uiConfigCache = uiConfigCache;
this.restFactory = restFactory;
view.setUiHandlers(this);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,24 +41,20 @@
public class DocumentUserPermissionsPresenter
extends MyPresenterWidget<DocumentUserPermissionsView> {

private final RestFactory restFactory;
private final DocumentUserPermissionsListPresenter documentUserPermissionsListPresenter;
private final Provider<DocumentUserPermissionsEditPresenter> documentUserPermissionsEditPresenterProvider;
private final ButtonView docEdit;
private final InlineSvgToggleButton showAllToggleButton;
private boolean showAllUsers;
private final InlineSvgToggleButton explicitOnly;
private DocRef docRef;

@Inject
public DocumentUserPermissionsPresenter(
final EventBus eventBus,
final DocumentUserPermissionsView view,
final RestFactory restFactory,
final DocumentUserPermissionsListPresenter documentUserPermissionsListPresenter,
final Provider<DocumentUserPermissionsEditPresenter> documentUserPermissionsEditPresenterProvider) {

super(eventBus, view);
this.restFactory = restFactory;
this.documentUserPermissionsListPresenter = documentUserPermissionsListPresenter;
this.documentUserPermissionsEditPresenterProvider = documentUserPermissionsEditPresenterProvider;
view.setPermissionsView(documentUserPermissionsListPresenter.getView());
Expand All @@ -68,11 +64,12 @@ public DocumentUserPermissionsPresenter(
"Edit Permissions For Selected User",
false));

showAllToggleButton = new InlineSvgToggleButton();
showAllToggleButton.setSvg(SvgImage.EYE);
showAllToggleButton.setTitle("Show Users Without Explicit Permissions");
showAllToggleButton.setState(false);
documentUserPermissionsListPresenter.addButton(showAllToggleButton);
explicitOnly = new InlineSvgToggleButton();
explicitOnly.setSvg(SvgImage.EYE_OFF);
explicitOnly.setTitle("Only Show Users With Explicit Permissions");
explicitOnly.setState(false);
documentUserPermissionsListPresenter.addButton(explicitOnly);
documentUserPermissionsListPresenter.setAllUsers(!explicitOnly.getState());
}

@Override
Expand All @@ -91,15 +88,15 @@ protected void onBind() {
onEdit();
}
}));
registerHandler(showAllToggleButton.addClickHandler(e -> {
if (showAllToggleButton.getState()) {
showAllToggleButton.setTitle("Hide Users Without Explicit Permissions");
showAllToggleButton.setSvg(SvgImage.EYE_OFF);
registerHandler(explicitOnly.addClickHandler(e -> {
if (explicitOnly.getState()) {
explicitOnly.setTitle("Show All Users");
explicitOnly.setSvg(SvgImage.EYE);
} else {
showAllToggleButton.setTitle("Show Users Without Explicit Permissions");
showAllToggleButton.setSvg(SvgImage.EYE);
explicitOnly.setTitle("Only Show Users With Explicit Permissions");
explicitOnly.setSvg(SvgImage.EYE_OFF);
}
documentUserPermissionsListPresenter.setAllUsers(showAllToggleButton.getState());
documentUserPermissionsListPresenter.setAllUsers(!explicitOnly.getState());
documentUserPermissionsListPresenter.refresh();
}));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public class UserPermissionReportPresenter
private final Provider<DocumentUserPermissionsEditPresenter> documentUserPermissionsEditPresenterProvider;
private final Provider<BatchDocumentPermissionsEditPresenter> batchDocumentPermissionsEditPresenterProvider;
private final ButtonView docEdit;
private final InlineSvgToggleButton showAllToggleButton;
private final InlineSvgToggleButton explicitOnly;
private final ButtonView docFilter;
private final ButtonView batchEdit;
private ExpressionOperator filterExpression;
Expand Down Expand Up @@ -91,11 +91,12 @@ public UserPermissionReportPresenter(final EventBus eventBus,
SvgImage.EDIT,
"Edit Permissions For Selected Document",
false));
showAllToggleButton = new InlineSvgToggleButton();
showAllToggleButton.setSvg(SvgImage.EYE);
showAllToggleButton.setTitle("Show Users Without Explicit Permissions");
showAllToggleButton.setState(false);
documentListPresenter.getView().addButton(showAllToggleButton);
explicitOnly = new InlineSvgToggleButton();
explicitOnly.setSvg(SvgImage.EYE_OFF);
explicitOnly.setTitle("Only Show Documents With Explicit Permissions");
explicitOnly.setState(false);
documentListPresenter.getView().addButton(explicitOnly);
documentListPresenter.getCriteriaBuilder().explicitPermission(explicitOnly.getState());
docFilter = documentListPresenter.getView().addButton(new Preset(
SvgImage.FILTER,
"Filter Documents To Apply Permissions Changes On",
Expand All @@ -121,15 +122,15 @@ protected void onBind() {
onEdit();
}
}));
registerHandler(showAllToggleButton.addClickHandler(e -> {
if (showAllToggleButton.getState()) {
showAllToggleButton.setTitle("Hide Documents Without Explicit Permissions");
showAllToggleButton.setSvg(SvgImage.EYE_OFF);
registerHandler(explicitOnly.addClickHandler(e -> {
if (explicitOnly.getState()) {
explicitOnly.setTitle("Show All Documents");
explicitOnly.setSvg(SvgImage.EYE);
} else {
showAllToggleButton.setTitle("Show Documents Without Explicit Permissions");
showAllToggleButton.setSvg(SvgImage.EYE);
explicitOnly.setTitle("Only Show Documents With Explicit Permissions");
explicitOnly.setSvg(SvgImage.EYE_OFF);
}
documentListPresenter.getCriteriaBuilder().explicitPermission(!showAllToggleButton.getState());
documentListPresenter.getCriteriaBuilder().explicitPermission(explicitOnly.getState());
documentListPresenter.refresh();
}));
registerHandler(docFilter.addClickHandler(e -> {
Expand Down
Loading

0 comments on commit cda7a25

Please sign in to comment.