From 7d7f458d8217a3bbc86d9f449c828c27443f7323 Mon Sep 17 00:00:00 2001 From: anhefti Date: Tue, 28 Sep 2021 17:14:08 +0200 Subject: [PATCH] SEBSERV-201 added migrations --- .../webservice/DBIntegrityCheck.java | 7 ++++ .../config/sql/base/V11__sebSettings_v1_3.sql | 37 +++++++++++++++++-- src/main/resources/messages.properties | 14 +++++-- 3 files changed, 52 insertions(+), 6 deletions(-) diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/DBIntegrityCheck.java b/src/main/java/ch/ethz/seb/sebserver/webservice/DBIntegrityCheck.java index 1e96b296..1d9b45d1 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/DBIntegrityCheck.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/DBIntegrityCheck.java @@ -10,12 +10,19 @@ package ch.ethz.seb.sebserver.webservice; import ch.ethz.seb.sebserver.gbl.util.Result; +/** Defines a data base integrity check and fix if available. */ public interface DBIntegrityCheck { + /** The name of the database integrity check */ String name(); + /** The description of the database integrity check */ String description(); + /** Apply the check and fix it if not correct and a fix id provided + * + * @param tryFix indicates if a fix shall be applied if the check fails and a fix is implemented + * @return check result message */ Result applyCheck(boolean tryFix); } diff --git a/src/main/resources/config/sql/base/V11__sebSettings_v1_3.sql b/src/main/resources/config/sql/base/V11__sebSettings_v1_3.sql index a1d71e6c..13bad1f7 100644 --- a/src/main/resources/config/sql/base/V11__sebSettings_v1_3.sql +++ b/src/main/resources/config/sql/base/V11__sebSettings_v1_3.sql @@ -1,7 +1,38 @@ --- ----------------------------------------------------- --- Remove SEB Settings from GUI (and templates too) --- ----------------------------------------------------- +-- ----------------------------------------------------------------- +-- SEBSERV-230 Remove exit keys from GUI (and templates too) +-- ----------------------------------------------------------------- DELETE FROM `orientation` WHERE `config_attribute_id`='5'; DELETE FROM `orientation` WHERE `config_attribute_id`='6'; DELETE FROM `orientation` WHERE `config_attribute_id`='7'; + +-- ----------------------------------------------------------------- +-- SEBSERV-201 Number 2 +-- ----------------------------------------------------------------- + +INSERT IGNORE INTO configuration_attribute VALUES + (972, 'allowCustomDownloadLocation', 'CHECKBOX', null, null, null, null, 'false'); + +UPDATE orientation SET config_attribute_id=972 WHERE config_attribute_id=62; +UPDATE orientation SET y_position=6 WHERE config_attribute_id=63 AND template_id=0; +UPDATE orientation SET y_position=9 WHERE config_attribute_id=64 AND template_id=0; +UPDATE orientation SET y_position=10 WHERE config_attribute_id=65 AND template_id=0; +UPDATE orientation SET y_position=11 WHERE config_attribute_id=66 AND template_id=0; + +-- ----------------------------------------------------------------- +-- SEBSERV-201 Number 3 +-- ----------------------------------------------------------------- + +INSERT IGNORE INTO configuration_attribute VALUES + (973, 'startURLAppendQueryParameter', 'CHECKBOX', null, null, null, null, 'false'); + +INSERT IGNORE INTO orientation (config_attribute_id, template_id, view_id, group_id, x_position, y_position, width, height, title) VALUES + (973, 0, 5, 'queryParams', 0, 10, 8, 1, 'NONE'); + +-- ----------------------------------------------------------------- +-- SEBSERV-201 Number 4 +-- ----------------------------------------------------------------- + +UPDATE orientation SET width=2 WHERE config_attribute_id=53; +INSERT IGNORE INTO orientation (config_attribute_id, template_id, view_id, group_id, x_position, y_position, width, height, title) VALUES + (904, 0, 3, 'userAgentTouch', 9, 5, 3, 1, 'NONE'); \ No newline at end of file diff --git a/src/main/resources/messages.properties b/src/main/resources/messages.properties index e80ee182..4481c782 100644 --- a/src/main/resources/messages.properties +++ b/src/main/resources/messages.properties @@ -1047,13 +1047,14 @@ sebserver.examconfig.props.label.newBrowserWindowShowURL.3=Always sebserver.examconfig.props.label.browserUserAgent=Suffix to be added to any user agent sebserver.examconfig.props.group.userAgentDesktop=User agent for desktop mode sebserver.examconfig.props.label.browserUserAgentWinDesktopMode.0=Desktop default -sebserver.examconfig.props.label.browserUserAgentWinDesktopMode.0.tooltip=Zoom whole web pages using Ctrl-Mousewheel (Win) +sebserver.examconfig.props.label.browserUserAgentWinDesktopMode.0.tooltip=Zoom whole web pages using Ctrl-Mousewheel (Win)
Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0 sebserver.examconfig.props.label.browserUserAgentWinDesktopMode.1=Custom sebserver.examconfig.props.label.browserUserAgentWinDesktopMode.1.tooltip=Zoom only text on web pages using Ctrl-Mousewheel (Win) sebserver.examconfig.props.label.browserUserAgentWinDesktopModeCustom.tooltip=Custom desktop user agent string
(SEB appends its version number automatically) sebserver.examconfig.props.group.userAgentTouch=User agent for touch/tablet mode sebserver.examconfig.props.label.browserUserAgentWinTouchMode.0=Touch default +sebserver.examconfig.props.label.browserUserAgentWinTouchMode.0.tooltip=Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0; Touch) Gecko/20100101 Firefox/52.0 sebserver.examconfig.props.label.browserUserAgentWinTouchMode.1=iPad sebserver.examconfig.props.label.browserUserAgentWinTouchMode.2=Custom sebserver.examconfig.props.label.browserUserAgentWinTouchMode.2.tooltip=Zoom only text on web pages using Ctrl-Mousewheel (Win) @@ -1067,7 +1068,7 @@ sebserver.examconfig.props.label.enableSebBrowser=Enable SEB with browser window sebserver.examconfig.props.label.enableSebBrowser.tooltip=Disable this to start another application in kiosk mode
(for example a virtual desktop infrastructure client) sebserver.examconfig.props.label.browserWindowTitleSuffix=Suffix to be added to every browser window -sebserver.examconfig.props.label.allowDownUploads=Allow downloading and uploading files (Mac) +sebserver.examconfig.props.label.allowDownUploads=Allow downloading and uploading files sebserver.examconfig.props.label.allowDownUpload.tooltip=Usually to be used with permitted third party applications
for which you want to provide files to be down-loaded sebserver.examconfig.props.label.downloadDirectoryWin=Download directory (Win) sebserver.examconfig.props.label.downloadDirectoryOSX=Download directory (Mac) @@ -1077,12 +1078,14 @@ sebserver.examconfig.props.label.chooseFileToUploadPolicy.tooltip=SEB can let us sebserver.examconfig.props.label.chooseFileToUploadPolicy.0=manually with file requester sebserver.examconfig.props.label.chooseFileToUploadPolicy.1=by attempting to upload the same file downloaded before sebserver.examconfig.props.label.chooseFileToUploadPolicy.2=by only allowing to upload the same file downloaded before -sebserver.examconfig.props.label.downloadPDFFiles=Download and open PDF files instead of displaying them inline (Mac) +sebserver.examconfig.props.label.downloadPDFFiles=Download and open PDF files instead of displaying them inline sebserver.examconfig.props.label.downloadPDFFiles.tooltip=PDF files will not be displayed by SEB but downloaded and openend (if "Open files after downloading" is active!)
by the application set in Finder (usually Preview or Adobe Acrobat). sebserver.examconfig.props.label.allowPDFPlugIn=Allow using Acrobat Reader PDF plugin (insecure! Mac only) sebserver.examconfig.props.label.allowPDFPlugIn.tooltip=The Adobe Acrobat Reader browser plugin should only be used on secured managed Mac computers,
at it allows limited access the file system and unlimited to cloud services sebserver.examconfig.props.label.downloadAndOpenSebConfig=Download and open SEB Config Files sebserver.examconfig.props.label.downloadAndOpenSebConfig.tooltip=Download and open .seb config files regardless if downloading and opening other file types is allowed +sebserver.examconfig.props.label.allowCustomDownloadLocation=Allow user to select custom download / upload directory + sebserver.examconfig.props.group.sessionHandling=Session Handling sebserver.examconfig.props.group.sessionHandling.tooltip=Use the following parameter to control whether a browser session is persistent on disk, e.g. to keep users
logged in after a reconfiguration. @@ -1109,6 +1112,11 @@ sebserver.examconfig.props.label.restartExamText=Title/tool tip text for the bac sebserver.examconfig.props.label.restartExamPasswordProtected=Protect back to start button with the quit/unlock password sebserver.examconfig.props.label.restartExamPasswordProtected.tooltip=The quit/restart password (if set) must be entered when the back to start button was pressed +sebserver.examconfig.props.group.queryParams=Query String Parameter +sebserver.examconfig.props.group.queryParams.tooltip=The seb(s):// link to the config file can contain an additional query string, separated from the main URL by \'?\' or '??'
(if the URL itself doesn't contain a query). SEB will then append this query string to the Start URL. +sebserver.examconfig.props.label.startURLAppendQueryParameter=Allow Query Parameter +sebserver.examconfig.props.label.startURLAppendQueryParameter.tooltip=If a seb(s):// link contains additional query string, SEB appends it to the exam's Start URL. + sebserver.examconfig.props.label.allowSwitchToApplications=Allow switching to third party application (Mac) sebserver.examconfig.props.label.allowSwitchToApplications.tooltip=Decreases security of the kiosk mode by allowing process switcher (Cmd+Tab).
The blacked out background of SEB also doesn't cover some alerts and modal windows in this mode. sebserver.examconfig.props.label.allowFlashFullscreen=Allow Flash to switch to fullscreen mode (Mac)