From e998e40bc1008b7bc6edf3876c2065270e508ea3 Mon Sep 17 00:00:00 2001 From: anhefti Date: Thu, 26 Jan 2023 16:02:21 +0100 Subject: [PATCH] SEBSERV-329 new migration task with new SEB Settings --- .../gbl/model/sebconfig/AttributeType.java | 2 + .../configs/ConfigTemplateAttributeForm.java | 73 ++++++++++--------- .../dao/impl/ExamConfigurationMapDAOImpl.java | 2 +- .../sebconfig/impl/ExamConfigXMLParser.java | 3 +- .../converter/ArrayOfStringConverter.java | 3 +- .../impl/validation/DecimalTypeValidator.java | 22 +++++- .../base/V18__additionalSEBSettings_v1_5.sql | 37 ++++++++++ src/main/resources/messages.properties | 62 ++++++++++++++++ .../admin/ConfigurationAttributeAPITest.java | 6 +- src/test/resources/data-test-additional.sql | 34 ++++++++- 10 files changed, 202 insertions(+), 42 deletions(-) create mode 100644 src/main/resources/config/sql/base/V18__additionalSEBSettings_v1_5.sql diff --git a/src/main/java/ch/ethz/seb/sebserver/gbl/model/sebconfig/AttributeType.java b/src/main/java/ch/ethz/seb/sebserver/gbl/model/sebconfig/AttributeType.java index 627076b1..0734c811 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gbl/model/sebconfig/AttributeType.java +++ b/src/main/java/ch/ethz/seb/sebserver/gbl/model/sebconfig/AttributeType.java @@ -21,6 +21,8 @@ public enum AttributeType { PASSWORD_FIELD(TEXT), /** Multiple lined text value */ TEXT_AREA(TEXT), + /** An editable list if TEXT_FIELD inputs stored in a comma separated String value */ + TEXT_FIELD_LIST(TEXT), /** Check Box or boolean type */ CHECKBOX(TEXT), diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/content/configs/ConfigTemplateAttributeForm.java b/src/main/java/ch/ethz/seb/sebserver/gui/content/configs/ConfigTemplateAttributeForm.java index bd0bae23..09d3a31e 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/content/configs/ConfigTemplateAttributeForm.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/content/configs/ConfigTemplateAttributeForm.java @@ -96,6 +96,9 @@ public class ConfigTemplateAttributeForm implements TemplateComposer { final EntityKey templateKey = pageContext.getParentEntityKey(); final Long templateId = Long.valueOf(templateKey.modelId); + boolean modifyGrant = false; + boolean hasView = false; + try { final ConfigurationNode template = this.restService @@ -104,9 +107,8 @@ public class ConfigTemplateAttributeForm implements TemplateComposer { .call() .onError(error -> pageContext.notifyLoadError(EntityType.CONFIGURATION_NODE, error)) .getOrThrow(); - final EntityGrantCheck entityGrant = this.currentUser.entityGrantCheck(template); - final boolean modifyGrant = entityGrant.m(); + modifyGrant = entityGrant.m(); // the attribute final TemplateAttribute attribute = this.restService.getBuilder(GetTemplateAttribute.class) @@ -131,8 +133,8 @@ public class ConfigTemplateAttributeForm implements TemplateComposer { FORM_TITLE); final PageContext formContext = pageContext.copyOf(content); - - final boolean hasView = attribute.getOrientation() != null; + hasView = attribute.getOrientation() != null; + final boolean _hasView = hasView; this.pageService.formBuilder(formContext) .readonly(true) // TODO change this for next version @@ -145,14 +147,14 @@ public class ConfigTemplateAttributeForm implements TemplateComposer { FORM_TYPE_TEXT_KEY, () -> this.resourceService.getAttributeTypeName(attribute))) .addFieldIf( - () -> hasView, + () -> _hasView, () -> FormBuilder.singleSelection( Domain.ORIENTATION.ATTR_VIEW_ID, FORM_VIEW_TEXT_KEY, attribute.getViewModelId(), () -> this.resourceService.getViewResources(templateKey.modelId))) .addFieldIf( - () -> hasView, + () -> _hasView, () -> FormBuilder.text( Domain.ORIENTATION.ATTR_GROUP_ID, FORM_GROUP_TEXT_KEY, @@ -201,37 +203,40 @@ public class ConfigTemplateAttributeForm implements TemplateComposer { configuration.id, Collections.singletonList(viewContext)); - this.pageService.pageActionBuilder(formContext.clearEntityKeys()) - - .newAction(ActionDefinition.SEB_EXAM_CONFIG_TEMPLATE_ATTR_FORM_SET_DEFAULT) - .withEntityKey(attributeKey) - .withParentEntityKey(templateKey) - .withExec(this.examConfigurationService::resetToDefaults) - .ignoreMoveAwayFromEdit() - .publishIf(() -> modifyGrant) - - .newAction(ActionDefinition.SEB_EXAM_CONFIG_TEMPLATE_ATTR_REMOVE_VIEW) - .withEntityKey(attributeKey) - .withParentEntityKey(templateKey) - .withExec(this.examConfigurationService::removeFromView) - .ignoreMoveAwayFromEdit() - .publishIf(() -> modifyGrant && hasView) - - .newAction(ActionDefinition.SEB_EXAM_CONFIG_TEMPLATE_ATTR_ATTACH_DEFAULT_VIEW) - .withEntityKey(attributeKey) - .withParentEntityKey(templateKey) - .withExec(this.examConfigurationService::attachToDefaultView) - .ignoreMoveAwayFromEdit() - .publishIf(() -> modifyGrant && !hasView) - - .newAction(ActionDefinition.SEB_EXAM_CONFIG_TEMPLATE_ATTR_FORM_EDIT_TEMPLATE) - .withEntityKey(templateKey) - .ignoreMoveAwayFromEdit() - .publish(); - } catch (final Exception e) { pageContext.notifyUnexpectedError(e); } + + final boolean _modifyGrant = modifyGrant; + final boolean _hasView = hasView; + this.pageService.pageActionBuilder(pageContext.clearEntityKeys()) + + .newAction(ActionDefinition.SEB_EXAM_CONFIG_TEMPLATE_ATTR_FORM_SET_DEFAULT) + .withEntityKey(attributeKey) + .withParentEntityKey(templateKey) + .withExec(this.examConfigurationService::resetToDefaults) + .ignoreMoveAwayFromEdit() + .publishIf(() -> _modifyGrant) + + .newAction(ActionDefinition.SEB_EXAM_CONFIG_TEMPLATE_ATTR_REMOVE_VIEW) + .withEntityKey(attributeKey) + .withParentEntityKey(templateKey) + .withExec(this.examConfigurationService::removeFromView) + .ignoreMoveAwayFromEdit() + .publishIf(() -> _modifyGrant && _hasView) + + .newAction(ActionDefinition.SEB_EXAM_CONFIG_TEMPLATE_ATTR_ATTACH_DEFAULT_VIEW) + .withEntityKey(attributeKey) + .withParentEntityKey(templateKey) + .withExec(this.examConfigurationService::attachToDefaultView) + .ignoreMoveAwayFromEdit() + .publishIf(() -> _modifyGrant && !_hasView) + + .newAction(ActionDefinition.SEB_EXAM_CONFIG_TEMPLATE_ATTR_FORM_EDIT_TEMPLATE) + .withEntityKey(templateKey) + .ignoreMoveAwayFromEdit() + .publish(); + } private Orientation getDefaultOrientation(final TemplateAttribute attribute) { diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/ExamConfigurationMapDAOImpl.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/ExamConfigurationMapDAOImpl.java index 2eb7793e..0c909ee6 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/ExamConfigurationMapDAOImpl.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/ExamConfigurationMapDAOImpl.java @@ -382,7 +382,7 @@ public class ExamConfigurationMapDAOImpl implements ExamConfigurationMapDAO { @Override @Transactional(readOnly = true) public Result checkNoActiveExamReferences(final Long configurationNodeId) { - return Result.tryCatch(() -> this.examConfigurationMapRecordMapper.selectByExample() + return Result.tryCatch(() -> !this.examConfigurationMapRecordMapper.selectByExample() .where( ExamConfigurationMapRecordDynamicSqlSupport.configurationNodeId, isEqualTo(configurationNodeId)) diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/sebconfig/impl/ExamConfigXMLParser.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/sebconfig/impl/ExamConfigXMLParser.java index 3be69f38..157f06c0 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/sebconfig/impl/ExamConfigXMLParser.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/sebconfig/impl/ExamConfigXMLParser.java @@ -332,7 +332,8 @@ public class ExamConfigXMLParser extends DefaultHandler { // check if we have a simple values array if (attribute != null && (attribute.type == AttributeType.MULTI_CHECKBOX_SELECTION || attribute.type == AttributeType.MULTI_SELECTION - || attribute.type == AttributeType.TEXT_AREA)) { + || attribute.type == AttributeType.TEXT_AREA + || attribute.type == AttributeType.TEXT_FIELD_LIST)) { saveValue(attrName, attribute, top.listIndex, (top.value == null) ? "" : top.value); } diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/sebconfig/impl/converter/ArrayOfStringConverter.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/sebconfig/impl/converter/ArrayOfStringConverter.java index 4971c76d..49ecc4b8 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/sebconfig/impl/converter/ArrayOfStringConverter.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/sebconfig/impl/converter/ArrayOfStringConverter.java @@ -39,7 +39,8 @@ public class ArrayOfStringConverter implements AttributeValueConverter { public static final Set SUPPORTED_TYPES = Collections.unmodifiableSet( new HashSet<>(Arrays.asList( AttributeType.MULTI_CHECKBOX_SELECTION, - AttributeType.MULTI_SELECTION))); + AttributeType.MULTI_SELECTION, + AttributeType.TEXT_FIELD_LIST))); private static final String XML_TEMPLATE = "%s"; private static final String XML_TEMPLATE_ENTRY = "%s"; diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/sebconfig/impl/validation/DecimalTypeValidator.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/sebconfig/impl/validation/DecimalTypeValidator.java index 441eac96..79bad66e 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/sebconfig/impl/validation/DecimalTypeValidator.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/sebconfig/impl/validation/DecimalTypeValidator.java @@ -12,6 +12,7 @@ import org.apache.commons.lang3.StringUtils; import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Component; +import ch.ethz.seb.sebserver.gbl.Constants; import ch.ethz.seb.sebserver.gbl.model.sebconfig.AttributeType; import ch.ethz.seb.sebserver.gbl.model.sebconfig.ConfigurationAttribute; import ch.ethz.seb.sebserver.gbl.model.sebconfig.ConfigurationValue; @@ -45,7 +46,26 @@ public class DecimalTypeValidator implements ConfigurationValueValidator { } try { - Double.parseDouble(value.value); + final double val = Double.parseDouble(value.value); + + final String resources = attribute.getResources(); + if (!StringUtils.isBlank(resources)) { + final String[] split = StringUtils.split(resources, Constants.LIST_SEPARATOR); + if (split.length > 0) { + // check lower boundary + if (Double.parseDouble(split[0]) < val) { + return false; + } + + if (split.length > 1) { + // check upper boundary + if (Double.parseDouble(split[1]) > val) { + return false; + } + } + } + } + return true; } catch (final NumberFormatException nfe) { return false; diff --git a/src/main/resources/config/sql/base/V18__additionalSEBSettings_v1_5.sql b/src/main/resources/config/sql/base/V18__additionalSEBSettings_v1_5.sql new file mode 100644 index 00000000..81da7594 --- /dev/null +++ b/src/main/resources/config/sql/base/V18__additionalSEBSettings_v1_5.sql @@ -0,0 +1,37 @@ +-- ----------------------------------------------------------------- +-- SEBSERV-329 starting with id 1550 +-- ----------------------------------------------------------------- + +INSERT IGNORE INTO configuration_attribute VALUES + (1550, 'aacDnsPrePinning', 'CHECKBOX', null, null, null, null, 'false'), + (1551, 'allowedDisplayBuiltinEnforce', 'CHECKBOX', null, null, null, null, 'true'), + (1552, 'allowedDisplayBuiltinExceptDesktop', 'CHECKBOX', null, null, null, null, 'true'), + (1553, 'allowMacOSVersionNumberCheckFull', 'CHECKBOX', null, null, null, null, 'false'), + (1554, 'allowMacOSVersionNumberMajor', 'COMBO_SELECTION', null, '10,11,12,13,14', null, null, '10'), + (1555, 'allowMacOSVersionNumberMinor', 'COMBO_SELECTION', null, '0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20', null, null, '11'), + (1556, 'allowMacOSVersionNumberPatch', 'COMBO_SELECTION', null, '0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20', null, null, '0'), + (1557, 'allowScreenCapture', 'CHECKBOX', null, null, null, null, 'false'), + (1558, 'browserMediaAutoplay', 'CHECKBOX', null, null, null, null, 'true'), + (1559, 'browserMediaAutoplayAudio', 'CHECKBOX', null, null, null, null, 'true'), + (1560, 'browserMediaAutoplayVideo', 'CHECKBOX', null, null, null, null, 'true'), + (1561, 'browserMediaCaptureCamera', 'CHECKBOX', null, null, null, null, 'false'), + (1562, 'browserMediaCaptureMicrophone', 'CHECKBOX', null, null, null, null, 'false'), + (1563, 'browserMediaCaptureScreen', 'CHECKBOX', null, null, null, null, 'false'), + (1564, 'browserWindowWebView', 'SINGLE_SELECTION', null, '0,1,2,3', null, null, '2'), + + (1565, 'defaultPageZoomLevel', 'DECIMAL', null, '0.25,4.0', 'DecimalTypeValidator', null, '1.0'), + (1566, 'defaultTextZoomLevel', 'DECIMAL', null, '0.9,3.5', 'DecimalTypeValidator', null, '1.0'), + (1567, 'enableMacOSAAC', 'CHECKBOX', null, null, null, null, 'false'), + (1568, 'enableRightMouseMac', 'CHECKBOX', null, null, null, null, 'false'), + (1569, 'mobileAllowInlineMediaPlayback', 'CHECKBOX', null, null, null, null, 'true'), + (1570, 'mobileCompactAllowInlineMediaPlayback', 'CHECKBOX', null, null, null, null, 'false'), + (1571, 'mobileSleepModeLockScreen', 'CHECKBOX', null, null, null, null, 'true'), + (1572, 'showQuitButton', 'CHECKBOX', null, null, null, null, 'true'), + (1573, 'showScrollLockButton', 'CHECKBOX', null, null, null, null, 'true'), + (1574, 'startURLAllowDeepLink', 'CHECKBOX', null, null, null, null, 'false'), + (1575, 'tabFocusesLinks', 'CHECKBOX', null, null, null, null, 'true'), + (1576, 'terminateProcesses', 'CHECKBOX', null, null, null, null, 'false'), + (1577, 'prohibitedProcesses.ignoreInAAC', 'CHECKBOX', 73, null, null, null, 'true'), + + (1578, 'sebAllowedVersions', 'TEXT_FIELD_LIST', null, null, null, null, null) +; \ No newline at end of file diff --git a/src/main/resources/messages.properties b/src/main/resources/messages.properties index 71e3b187..fba48880 100644 --- a/src/main/resources/messages.properties +++ b/src/main/resources/messages.properties @@ -1782,6 +1782,67 @@ sebserver.examconfig.props.validation.DecimalTypeValidator=Invalid decimal numbe sebserver.examconfig.props.validation.ExitKeySequenceValidator=Key is already in sequence sebserver.examconfig.props.validation.WindowsSizeValidator=Invalid number +sebserver.examconfig.props.label.aacDnsPrePinning=Use AAC with DNS pre-pinning +sebserver.examconfig.props.label.aacDnsPrePinning.tooltip=On macOS <12.1 DNS lookup doesn't work while in AAC.
Pre-pinning resolves all domains from Start URL and URL filter rules before starting AAC to mitigate this bug.
This allows to use AAC on macOS 11 - 12.0 +sebserver.examconfig.props.label.allowedDisplayBuiltinEnforce=Enforce built-in display +sebserver.examconfig.props.label.allowedDisplayBuiltinEnforce.tooltip=Enforces using the built-in display: If none is available, refuses to run +sebserver.examconfig.props.label.allowedDisplayBuiltinExceptDesktop=Allow desktop Macs +sebserver.examconfig.props.label.allowedDisplayBuiltinExceptDesktop.tooltip=Allows to use Macs, which don't have a built-in display (like a Mac Mini or Mac Pro), even if enforcing it is enabled +sebserver.examconfig.props.label.allowMacOSVersionNumberCheckFull=Check full macOS version number +sebserver.examconfig.props.label.allowMacOSVersionNumberCheckFull.tooltip=In addition to major version, check also for allowed minor and patch version number +sebserver.examconfig.props.label.allowMacOSVersionNumberMajor=Major version number +sebserver.examconfig.props.label.allowMacOSVersionNumberMinor=Minor version number +sebserver.examconfig.props.label.allowMacOSVersionNumberPatch=Patch version number +sebserver.examconfig.props.label.allowScreenCapture=Allow screen capture/recording +sebserver.examconfig.props.label.allowScreenCapture.tooltip=Allows macOS screen capture (screen shots) and recording (cmd-shift-3/-4/-5) +sebserver.examconfig.props.label.browserMediaAutoplay=Media autoplay +sebserver.examconfig.props.label.browserMediaAutoplay.tooltip=Some video/audio content will start playing without user interaction.
Some other content might not be playable without enabling this setting (but will not auto play) +sebserver.examconfig.props.label.browserMediaAutoplayAudio=Audio autoplay +sebserver.examconfig.props.label.browserMediaAutoplayAudio.tooltip=Using the modern WebView, audio autoplay can be controlled separately +sebserver.examconfig.props.label.browserMediaAutoplayVideo=Video autoplay +sebserver.examconfig.props.label.browserMediaAutoplayVideo.tootlip=Using the modern WebView, video autoplay can be controlled separately +sebserver.examconfig.props.label.browserMediaCaptureCamera=Allow camera capture +sebserver.examconfig.props.label.browserMediaCaptureCamera.tooltip=Allow web sites to access the camera, for WebRTC live streams or still pictures (only in modern WebView and on macOS 11.1/iOS 14.3 or newer) +sebserver.examconfig.props.label.browserMediaCaptureMicrophone=Allow microphone capture +sebserver.examconfig.props.label.browserMediaCaptureMicrophone.tooltip=Allow web sites to access the microphone, for WebRTC live streams or audio recording (only in modern WebView and on macOS 11.1/iOS 14.3 or newer) +sebserver.examconfig.props.label.browserMediaCaptureScreen=Allow screen capture +sebserver.examconfig.props.label.browserMediaCaptureScreen.tooltip=Allow web sites to capture the screen, for WebRTC live streams or still pictures (only in modern WebView and on macOS 11.1 or newer ) +sebserver.examconfig.props.label.browserWindowWebView=Select Browser Engine Policy +sebserver.examconfig.props.label.browserWindowWebView.tooltip=The modern WKWebView browser engine currently doesn't support URL content filters (Network > URL Filter > Filter Embedded Content)
and sending the Browser Exam and Config Key in HTTP headers (Exam Session > Use Browser & Config Keys).
If one of these settings is enabled, the classic WebView is used in the Automatic policy.
Prefer Modern ignores the 'Use Browser & Config Keys' option in new tabs on a different server or generally. +sebserver.examconfig.props.label.browserWindowWebView.0=Automatic +sebserver.examconfig.props.label.browserWindowWebView.1=Force Classic +sebserver.examconfig.props.label.browserWindowWebView.2=Prefer Modern in New Tab+Different Host +sebserver.examconfig.props.label.browserWindowWebView.3=Prefer Modern +sebserver.examconfig.props.label.defaultPageZoomLevel=Default page zoom level +sebserver.examconfig.props.label.defaultPageZoomLevel.tooltip=Zoom level to use by default on every page +sebserver.examconfig.props.label.defaultTextZoomLevel=Default text zoom level +sebserver.examconfig.props.label.defaultTextZoomLevel.tooltip=Zoom level to use by default on every page. When using the modern WebView, text zoom only works on some (simple) webpages
and is only enabled when the page zoom level is 1.0 +sebserver.examconfig.props.label.enableMacOSAAC=Prefer Assessment Mode (AAC) +sebserver.examconfig.props.label.enableMacOSAAC.tooltip=Automatic Assessment Configuration (AAC) Assessment Mode is available from macOS Monterey 12.1 (and Catalina 10.15.4 and >= 10.15.6).
It blocks various macOS features (which cannot be allowed optionally, like screen capture/sharing, Siri, Dictation) +sebserver.examconfig.props.label.enableRightMouseMac=Enable right mouse button +sebserver.examconfig.props.label.enableRightMouseMac.tooltip=Enable to access context menu for Web Inspector in SEB for macOS (use ONLY for debugging).
Disable to prevent right mouse button actions/context menu for sharing content (with modern WebView) and in browser plugins/video players +sebserver.examconfig.props.label.mobileAllowInlineMediaPlayback=Allow inline playback on iPad +sebserver.examconfig.props.label.mobileAllowInlineMediaPlayback.tooltip=Video content can be played inline on a web page or only in full screen.
By disabling this option, HTML5 video players are forced to use the iOS user interface for controlling playback +sebserver.examconfig.props.label.mobileCompactAllowInlineMediaPlayback=Allow inline playback on iPhone +sebserver.examconfig.props.label.mobileCompactAllowInlineMediaPlayback.tooltip=Video content can be played inline on a web page or only in full screen.
By disabling this option, HTML5 video players are forced to use the iOS user interface for controlling playback +sebserver.examconfig.props.label.mobileSleepModeLockScreen=Lock screen after sleep mode +sebserver.examconfig.props.label.mobileSleepModeLockScreen.tooltip=On devices with iOS <= 12, sleep mode can be activated while in AAC by for example closing an iPad case.
Use this option to display a lock screen when the device is woken up +sebserver.examconfig.props.label.showQuitButton=Show quit button +sebserver.examconfig.props.label.showQuitButton.tooltip=Shows the Quit SEB/Session Dock button +sebserver.examconfig.props.label.showScrollLockButton=Show scroll lock button (iOS) +sebserver.examconfig.props.label.showScrollLockButton.tooltip=Shows the scroll lock button in the Dock if the scroll lock feature is enabled (iOS only) +sebserver.examconfig.props.label.startURLAllowDeepLink=Allow Deep Linking for Exams +sebserver.examconfig.props.label.startURLAllowDeepLink.tooltip=If using a Universal Link or an indirect seb(s):// link, SEB will search its path hierarchy for config files with this setting Longer
UI description string: Deep linking allows to directly open various exams using just one exam config file placed
somewhere in the path hierarchy of a sebs:// or Universal Link (those links need to start with the URL used in Start URL). +sebserver.examconfig.props.label.tabFocusesLinks=Tab focuses links +sebserver.examconfig.props.label.tabFocusesLinks.tooltip=Pressing the tab key moves focus to the next link and form control. Shift-tab moves focus to the previous control +sebserver.examconfig.props.label.terminateProcesses=Require to quit all applications +sebserver.examconfig.props.label.terminateProcesses.tooltip=SEB will attempt to quit applications/processes which are not permitted to run during an exam and require to terminate those which are prohibited +sebserver.examconfig.props.label.prohibitedProcesses.ignoreInAAC=Ignore in AAC +sebserver.examconfig.props.label.prohibitedProcesses.ignoreInAAC.tooltip=When using the AAC kiosk mode (which prevents network and screen access for other processes), ignore this prohibited process +sebserver.examconfig.props.label.sebAllowedVersions=Allowed SEB Versions +sebserver.examconfig.props.label.sebAllowedVersions.tooltip=List of text inputs which represent either a specific or a minimal SEB version which is allowed to access the (exam) session using current settings.
The version string has the following format: [OS.mayor.minor.patch(.minimal)], OS and mayor version are mandatory,
"minimal" indicates if version shall be interpreted as minimal version this and all above are valid. + + ################################ # SEB Exam Configuration Template ################################ @@ -1828,6 +1889,7 @@ sebserver.configtemplate.attr.type.FILE_UPLOAD=File Upload sebserver.configtemplate.attr.type.TABLE=Table sebserver.configtemplate.attr.type.INLINE_TABLE=Table sebserver.configtemplate.attr.type.COMPOSITE_TABLE=Table +sebserver.configtemplate.attr.type.TEXT_FIELD_LIST=Text Field List sebserver.configtemplate.attrs.list.title=Exam Configuration Attributes sebserver.configtemplate.attrs.list.title.subtitle=Table of all exam configuration attributes of this template diff --git a/src/test/java/ch/ethz/seb/sebserver/webservice/integration/api/admin/ConfigurationAttributeAPITest.java b/src/test/java/ch/ethz/seb/sebserver/webservice/integration/api/admin/ConfigurationAttributeAPITest.java index af5c0ad4..ce030701 100644 --- a/src/test/java/ch/ethz/seb/sebserver/webservice/integration/api/admin/ConfigurationAttributeAPITest.java +++ b/src/test/java/ch/ethz/seb/sebserver/webservice/integration/api/admin/ConfigurationAttributeAPITest.java @@ -87,7 +87,7 @@ public class ConfigurationAttributeAPITest extends AdministrationAPIIntegrationT assertNotNull(names); assertFalse(names.isEmpty()); - assertEquals("241", String.valueOf(names.size())); + assertEquals("270", String.valueOf(names.size())); this.params.clear(); this.params.add(ConfigurationAttribute.FILTER_ATTR_TYPE, AttributeType.CHECKBOX.name()); @@ -99,7 +99,7 @@ public class ConfigurationAttributeAPITest extends AdministrationAPIIntegrationT assertNotNull(names); assertFalse(names.isEmpty()); - assertEquals("139", String.valueOf(names.size())); + assertEquals("161", String.valueOf(names.size())); } @Test @@ -122,7 +122,7 @@ public class ConfigurationAttributeAPITest extends AdministrationAPIIntegrationT forIds = this.configurationAttributeController.getForIds(null); assertNotNull(forIds); - assertEquals("241", String.valueOf(forIds.size())); + assertEquals("270", String.valueOf(forIds.size())); } @Test diff --git a/src/test/resources/data-test-additional.sql b/src/test/resources/data-test-additional.sql index cc4fe93e..97002aad 100644 --- a/src/test/resources/data-test-additional.sql +++ b/src/test/resources/data-test-additional.sql @@ -306,7 +306,39 @@ INSERT IGNORE INTO configuration_attribute VALUES (933, 'startResource', 'TEXT_FIELD', null, null, null, null, ''), (1000, 'originatorVersion', 'TEXT_FIELD', null, null, null, null, 'SEB_Server_0.3.0'), - (1001, 'sebConfigPurpose', 'RADIO_SELECTION', null, '0,1', null, null, '0') + (1001, 'sebConfigPurpose', 'RADIO_SELECTION', null, '0,1', null, null, '0'), + + (1550, 'aacDnsPrePinning', 'CHECKBOX', null, null, null, null, 'false'), + (1551, 'allowedDisplayBuiltinEnforce', 'CHECKBOX', null, null, null, null, 'true'), + (1552, 'allowedDisplayBuiltinExceptDesktop', 'CHECKBOX', null, null, null, null, 'true'), + (1553, 'allowMacOSVersionNumberCheckFull', 'CHECKBOX', null, null, null, null, 'false'), + (1554, 'allowMacOSVersionNumberMajor', 'COMBO_SELECTION', null, '10,11,12,13,14', null, null, '10'), + (1555, 'allowMacOSVersionNumberMinor', 'COMBO_SELECTION', null, '0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20', null, null, '11'), + (1556, 'allowMacOSVersionNumberPatch', 'COMBO_SELECTION', null, '0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20', null, null, '0'), + (1557, 'allowScreenCapture', 'CHECKBOX', null, null, null, null, 'false'), + (1558, 'browserMediaAutoplay', 'CHECKBOX', null, null, null, null, 'true'), + (1559, 'browserMediaAutoplayAudio', 'CHECKBOX', null, null, null, null, 'true'), + (1560, 'browserMediaAutoplayVideo', 'CHECKBOX', null, null, null, null, 'true'), + (1561, 'browserMediaCaptureCamera', 'CHECKBOX', null, null, null, null, 'false'), + (1562, 'browserMediaCaptureMicrophone', 'CHECKBOX', null, null, null, null, 'false'), + (1563, 'browserMediaCaptureScreen', 'CHECKBOX', null, null, null, null, 'false'), + (1564, 'browserWindowWebView', 'SINGLE_SELECTION', null, '0,1,2,3', null, null, '2'), + + (1565, 'defaultPageZoomLevel', 'DECIMAL', null, '0.25,4.0', 'DecimalTypeValidator', null, '1.0'), + (1566, 'defaultTextZoomLevel', 'DECIMAL', null, '0.9,3.5', 'DecimalTypeValidator', null, '1.0'), + (1567, 'enableMacOSAAC', 'CHECKBOX', null, null, null, null, 'false'), + (1568, 'enableRightMouseMac', 'CHECKBOX', null, null, null, null, 'false'), + (1569, 'mobileAllowInlineMediaPlayback', 'CHECKBOX', null, null, null, null, 'true'), + (1570, 'mobileCompactAllowInlineMediaPlayback', 'CHECKBOX', null, null, null, null, 'false'), + (1571, 'mobileSleepModeLockScreen', 'CHECKBOX', null, null, null, null, 'true'), + (1572, 'showQuitButton', 'CHECKBOX', null, null, null, null, 'true'), + (1573, 'showScrollLockButton', 'CHECKBOX', null, null, null, null, 'true'), + (1574, 'startURLAllowDeepLink', 'CHECKBOX', null, null, null, null, 'false'), + (1575, 'tabFocusesLinks', 'CHECKBOX', null, null, null, null, 'true'), + (1576, 'terminateProcesses', 'CHECKBOX', null, null, null, null, 'false'), + (1577, 'prohibitedProcesses.ignoreInAAC', 'CHECKBOX', 73, null, null, null, 'true'), + + (1578, 'sebAllowedVersions', 'TEXT_FIELD_LIST', null, null, null, null, null) ;