Skip to content

Commit c0828cd

Browse files
authored
Merge pull request #50 from JaneliaSciComp/remove-temp-ownership-admin
removed "temp ownership admin" feature
2 parents e5fc244 + c57d2da commit c0828cd

File tree

2 files changed

+0
-40
lines changed

2 files changed

+0
-40
lines changed

modules/ViewerController/src/main/java/org/janelia/workstation/controller/TmViewerManager.java

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ public class TmViewerManager implements GlobalViewerController {
3939
private ProjectInitFacade projectInit;
4040
private DomainObject currProject;
4141
private int NUMBER_FRAGMENTS_THRESHOLD = 100;
42-
private boolean isTempOwnershipAdmin = false;
4342
private boolean areOperationsLogged = false;
4443

4544

@@ -195,25 +194,12 @@ public boolean editsAllowed() {
195194
return ClientDomainUtils.hasWriteAccess(modelManager.getCurrentWorkspace());
196195
}
197196

198-
public boolean isTempOwnershipAdmin() {
199-
return isTempOwnershipAdmin;
200-
}
201-
202-
public void setTempOwnershipAdmin(boolean tempOwnershipAdmin) {
203-
isTempOwnershipAdmin = tempOwnershipAdmin;
204-
}
205-
206197
public boolean isOwnershipAdmin() {
207198
// workstation admins always qualify
208199
if (AccessManager.getAccessManager().isAdmin()) {
209200
return true;
210201
}
211202

212-
// user has temporary admin (think of it as sudo)
213-
if (isTempOwnershipAdmin()) {
214-
return true;
215-
}
216-
217203
// check if user has admin role in tracers group:
218204
Subject subject = AccessManager.getAccessManager().getAuthenticatedSubject();
219205
if (subject==null) {

modules/ViewerInfoPanel/src/main/java/org/janelia/workstation/infopanel/AnnotationPanel.java

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ public void actionPerformed(ActionEvent actionEvent) {
7575
private WorkspaceSaveAsAction saveAsAction;
7676
private JCheckBoxMenuItem automaticTracingMenuItem;
7777
private JCheckBoxMenuItem automaticRefinementMenuItem;
78-
private JCheckBoxMenuItem tempOwnerAdminItem;
7978
private NeuronExportAllAction exportAllSWCAction;
8079
private NeuronFilterAction neuronFilterAction;
8180
private ImportSWCAction importSWCAction;
@@ -259,31 +258,6 @@ public void itemStateChanged(ItemEvent itemEvent) {
259258
saveAsAction = new WorkspaceSaveAsAction();
260259
workspaceToolMenu.add(new JMenuItem(saveAsAction));
261260

262-
tempOwnerAdminItem = new JCheckBoxMenuItem("Temp ownership admin");
263-
tempOwnerAdminItem.setSelected(false);
264-
tempOwnerAdminItem.addItemListener(e -> {
265-
if (e.getStateChange() == ItemEvent.SELECTED) {
266-
// about to get temporary ownership admin: dialog warning!
267-
int ans = JOptionPane.showConfirmDialog(
268-
ComponentUtil.getMainWindow(),
269-
"You are about to give yourself permission to change any neuron's owner. Be careful!\n\nContinue?",
270-
"Become owner admin?",
271-
JOptionPane.OK_CANCEL_OPTION,
272-
JOptionPane.WARNING_MESSAGE
273-
);
274-
if (ans == JOptionPane.CANCEL_OPTION) {
275-
tempOwnerAdminItem.setSelected(false);
276-
} else {
277-
TmViewerManager.getInstance().setTempOwnershipAdmin(true);
278-
}
279-
} else {
280-
// giving up admin
281-
TmViewerManager.getInstance().setTempOwnershipAdmin(false);
282-
}
283-
}
284-
);
285-
workspaceToolMenu.add(tempOwnerAdminItem);
286-
287261
// workspace tool menu button
288262
final JButton workspaceToolButton = new JButton();
289263
String gearIconFilename = "cog.png";

0 commit comments

Comments
 (0)