Skip to content

Commit

Permalink
SWC-6619
Browse files Browse the repository at this point in the history
  • Loading branch information
jay-hodgson committed Nov 28, 2023
1 parent 75115f4 commit 87b2997
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,15 @@ public void checkUpdateEntity(EntityBundle toUpdate, Callback callback) {
// not logged in
placeChanger.goTo(new LoginPlace(LoginPlace.LOGIN_TOKEN));
} else {
callback.invoke();
// If the user could edit if certified, but currently cannot edit, then show the quiz info dialog
if (
toUpdate.getPermissions().getCanCertifiedUserEdit() &&
!toUpdate.getPermissions().getCanEdit()
) {
getQuizInfoDialog().show();
} else {
callback.invoke();
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -1082,7 +1082,7 @@ private void configureProvenance() {
) {
actionMenu.setActionVisible(
Action.EDIT_PROVENANCE,
permissions.getCanEdit()
permissions.getCanCertifiedUserEdit()
);
actionMenu.setActionListener(Action.EDIT_PROVENANCE, this);
actionMenu.setActionText(
Expand All @@ -1101,7 +1101,7 @@ private void configureChangeStorageLocation() {
) {
actionMenu.setActionVisible(
Action.CHANGE_STORAGE_LOCATION,
permissions.getCanEdit()
permissions.getCanCertifiedUserEdit()
);
actionMenu.setActionText(
Action.CHANGE_STORAGE_LOCATION,
Expand Down Expand Up @@ -1354,7 +1354,7 @@ private void configureEditWiki() {
if (isWikiableConfig(entityBundle.getEntity(), currentArea)) {
actionMenu.setActionVisible(
Action.EDIT_WIKI_PAGE,
permissions.getCanEdit()
permissions.getCanCertifiedUserEdit()
);
actionMenu.setActionListener(Action.EDIT_WIKI_PAGE, this);
actionMenu.setActionText(
Expand Down

0 comments on commit 87b2997

Please sign in to comment.