Skip to content

Configuring a Server Purely for Campaign Management

Afghanistan Polio Management Information System (APMIS) Project edited this page Sep 21, 2021 · 1 revision

https://github.com/hzi-braunschweig/SORMAS-Project/wiki/Configuring-a-Server-Purely-for-Campaign-Management

Configuring a Server Purely for Campaign Management Martin Wahnschaffe edited this page on Apr 20 · 2 revisions Server configuration in the sormas.properties file The whole configuration is described here: https://github.com/hzi-braunschweig/SORMAS-Project/blob/development/SERVER_CUSTOMIZATION.md#server-configuration Most important are the following two settings:

Default locale country.locale: This is the locale your server is using as long as the user has not overwritten it in their settings. It impacts both the language that SORMAS is displayed in as well as e.g. date formats. Custom branding: Properties used to apply a custom branding to SORMAS that overrides its name and default logo. Using these properties also alters the sidebar and adds another customizable area to it. If you want to use this feature, set custombranding to true. custombranding.name is the name that you want to use, custombranding.logo.path is the path to the logo that should be used. Custom login page https://github.com/hzi-braunschweig/SORMAS-Project/blob/development/SERVER_CUSTOMIZATION.md#custom-login-page

Custom download files in about section https://github.com/hzi-braunschweig/SORMAS-Project/blob/development/SERVER_CUSTOMIZATION.md#custom-download-files-in-about-section

Customizing the name and icon of the android app https://github.com/hzi-braunschweig/SORMAS-Project/wiki/Customizing-the-name-and-icon-of-the-Android-app

Feature configuration https://github.com/hzi-braunschweig/SORMAS-Project/blob/development/SERVER_CUSTOMIZATION.md#feature-configuration You will need to enabled the following two features:

Campaigns CAMPAIGNS: The campaigns module allows collecting flexible data which can be customized using the JSON format. Currently this is heavily geared towards vaccination campaigns in Afghanistan, but will be usable in a more generic way in the future for other countries as well. Area Infrastructure INFRASTRUCTURE_TYPE_AREA: Enables an additional infrastructure level above region that is called area by default. Currently only used in the campaigns module. All other features should be disabled.

User roles It is possible to limit the available user roles that an admin can assign to a created user. To do so, user role config entries have to be created in the database. You can adjust this SQL script to do so:

DO $$ DECLARE _roleEnabled boolean := false; _roleId bigint; _uuid varchar; _userRole varchar; _userRoles varchar[] := array['USER_ROLE_NAME_A', 'USER_ROLE_NAME_B']; BEGIN

FOREACH _userRole IN ARRAY _userRoles
LOOP

	SELECT id FROM userrolesconfig WHERE userrole = _userRole INTO _roleId;
	
	IF(_roleId is null) 
		THEN 
			_uuid = overlay(overlay(overlay(
                        substring(upper(REPLACE(CAST(CAST(md5(CAST(random() AS text) || CAST(clock_timestamp() AS text)) AS uuid) AS text), '-', '')), 0, 30)
                        placing '-' from 7) placing '-' from 14) placing '-' from 21);
    		INSERT INTO userrolesconfig (id, uuid, changedate, creationdate, userrole, sys_period, enabled) 
			VALUES (nextval('entity_seq'), _uuid, now(), now(),_userRole, NULL, _roleEnabled);
		ELSE
			UPDATE userrolesconfig SET  changedate =  now(), enabled = _roleEnabled WHERE id = _roleId;
	END IF;		
END LOOP;

END $$ LANGUAGE plpgsql