diff options
| author | Simon Rettberg | 2016-09-05 18:52:04 +0200 |
|---|---|---|
| committer | Simon Rettberg | 2016-09-05 18:52:04 +0200 |
| commit | b9bd4b86e30cf5752a9b6c27099409c5279f699e (patch) | |
| tree | 3325d8689dccb8d2adb3b6851cad7b3aa414989d | |
| parent | [server] Write usb enabled/disabled to virt config (diff) | |
| parent | [client] make image details editable only when working with local images (diff) | |
| download | tutor-module-b9bd4b86e30cf5752a9b6c27099409c5279f699e.tar.gz tutor-module-b9bd4b86e30cf5752a9b6c27099409c5279f699e.tar.xz tutor-module-b9bd4b86e30cf5752a9b6c27099409c5279f699e.zip | |
Merge branch 'v1.1' of git.openslx.org:openslx-ng/tutor-module into v1.1
| -rw-r--r-- | dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/NetrulesConfigurator.java | 16 | ||||
| -rw-r--r-- | dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImageDetailsWindow.java | 5 |
2 files changed, 6 insertions, 15 deletions
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/NetrulesConfigurator.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/NetrulesConfigurator.java index e715d075..f4fe01e7 100644 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/NetrulesConfigurator.java +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/NetrulesConfigurator.java @@ -37,7 +37,7 @@ public class NetrulesConfigurator extends NetrulesConfiguratorLayout { private static final long serialVersionUID = -3497629601818983994L; private final static Logger LOGGER = Logger .getLogger(NetrulesConfigurator.class); - private List<NetRule> originalNetRules = null; + private String originalRawRuleText = null; /** * Character defining how the rules are parsed, e.g. for whitespace \\s @@ -339,20 +339,6 @@ public class NetrulesConfigurator extends NetrulesConfiguratorLayout { tpNetworkRules.setCharacterAttributes(set, true); } -// /** -// * Wrapper class for the advanced configuration information needed since we -// * need to return a single object from the runAndReturn routine. This class -// * has two members: the list of NetRule(s) (as List<NetRule>) and the -// * runScriptText (as String) -// */ -// public static class NetrulesConfiguration { -// public List<NetRule> netRulesList; -// -// public NetrulesConfiguration(List<NetRule> netRulesList) { -// this.netRulesList = netRulesList; -// } -// } - /** * Custom event mechanism to detect changes to the user list (Mostly needed * for the reactToChange() stuff in LectureDetailsWindow) diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImageDetailsWindow.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImageDetailsWindow.java index bf424c61..f46985ce 100644 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImageDetailsWindow.java +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImageDetailsWindow.java @@ -793,6 +793,11 @@ public class ImageDetailsWindow extends ImageDetailsWindowLayout implements UiFe * @param editable true to make fields editable, false otherwise. */ private void makeEditable(boolean editable) { + // always disable all buttons unless image's share mode is LOCAL or PUBLISH + if (image != null) + editable &= image.shareMode == ShareMode.LOCAL || image.shareMode == ShareMode.PUBLISH; + + // now do the regular permission check editable = editable && (ImagePerms.canEdit(image) || ImagePerms.canAdmin(image)); txtTitle.setEditable(editable); txtDescription.setEditable(editable); |
