Skip to content
Carlo Beltrame edited this page Dec 13, 2022 · 1 revision

Welcome to the decidim.swiss wiki! Here we document some changes which we implemented for decidim.swiss and the tenants on that platform.

Customizations in the system dashboard

For better tenant support and customizability, we have implemented a few tenant-specific settings into the system dashboard.

Tenant type ("Spezial-Features")

For various tenant-specific features, such as specialized design adjustments or adjusting Devise translations, we needed a way to distinguish between tenants which would work equally well on integration and production environments. Since the ids of the tenants may vary between integration and production, and since it's bad practice to hardcode ids in code, we instead introduced the tenant type field. Each tenant may or may not select a value in this dropdown select. Selecting e.g. dialogluzern will activate features which were specially developed for dialogluzern.ch, because in the source code we use this tenant type field to decide whether the currently displayed page belongs to a tenant of type "dialogluzern" or not.

Map settings ("Karteneinstellungen")

Tenants have the (theoretical) option to select a map provider. At the moment, only swisstopo maps are supported, and swisstopo is also the default value in case no value is supplied. The map provider can only be changed for all maps of the whole tenant at a time. There is also no way to layer map data of different providers in the same map, due to limitations of the underlying leaflet library which displays the maps.

Tenants also have the option to set the default center of the various (swisstopo) maps on the platform. This is provided in the form of a pair of latitude / longitude coordinates. The default coordinates (in case no value is supplied) show the city of Lucerne.

Tenants may set a bounding box for maps, in the form of a minimal and maximal latitude value and a minimal and maximal longitude value. This bounding box is used to limit the options displayed in autocomplete address fields across the tenant. Also, any map markers which lie outside this bounding box are ignored, when centering a map on all the available markers. The bounding box does not prevent manually entering or dragging an address outside of it, and users see no indication of whether their entered location lies inside or outside the bounding box. The bounding box also does not completely prevent maps from showing small areas outside of the bounding box, the maps are just only ever centered on content inside the bounding box. The default bounding box (if no value is supplied for a tenant) is centered around the city of Lucerne.

ASPSMS credentials ("ASPSMS Anbindung")

For our supported Swiss SMS verification flow, tenants have the option to supply an ASPSMS API key and password. We always use the ASPSMS affiliate ID of Puzzle ITC along with these credentials for sending SMS. Filling in ASPSMS credentials is required on tenants which activate the "Code by SMS (Multi-Step)" / "Code per SMS (Mehrschritt)" authorization method.