Skip to content

Commit

Permalink
Review the server metadata : removing deprecated items, moving fonts
Browse files Browse the repository at this point in the history
  • Loading branch information
Gustry committed Sep 26, 2023
1 parent 7f80392 commit 805c32a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
6 changes: 2 additions & 4 deletions lizmap_server/server_info_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,29 +192,27 @@ def handleRequest(self, context):
tag = ""

data = {
# Only the "qgis_server" section is forwarded in LWC source code
'qgis_server': {
'metadata': {
'version': human_version, # 3.16.0
'tag': tag, # final-3_16_0
'name': human_name, # Hannover
'commit_id': commit_id, # 288d2cacb5 if it's a dev version
'version_int': Qgis.QGIS_VERSION_INT, # 31600
'py_qgis_server': PY_QGIS_SERVER_INSTALLED, # bool, # deprecated since 28/10/2022
'py_qgis_server_version': py_qgis_server_metadata.version, # str, deprecated since 28/10/2022
},
'py_qgis_server': {
'found': is_py_qgis_server,
'version': py_qgis_server_metadata.version,
'build_id': py_qgis_server_metadata.build_id,
'commit_id': py_qgis_server_metadata.commit_id,
'stable_release': py_qgis_server_metadata.is_stable, # bool, deprecated since 16/12/2022
'stable': py_qgis_server_metadata.is_stable,
},
# 'support_custom_headers': self.support_custom_headers(),
'services': services_available,
'plugins': plugins,
'fonts': QFontDatabase().families(),
},
'fonts': QFontDatabase().families(),
'environment': {
'gdal': gdal.VersionInfo('VERSION_NUM'),
'python': sys.version,
Expand Down
3 changes: 2 additions & 1 deletion test/test_lizmap_accesscontrol.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ def test_no_lizmap_config(client):
assert len(layers) == 2

# Make a request with LIZMAP_USER_GROUPS with 1 group
qs = "?SERVICE=WMS&REQUEST=GetCapabilities&MAP=france_parts.qgs&LIZMAP_USER_GROUPS=test1"
# With some different cases in the group
qs = "?SERVICE=WMS&REQUEST=GetCapabilities&MAP=france_parts.qgs&Lizma_User_grOUPS=test1"
rv = client.get(qs, projectfile)
assert rv.status_code == 200

Expand Down
2 changes: 1 addition & 1 deletion test/test_server_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def test_lizmap_server_info(client):
assert json_content['qgis_server']['plugins'][plugin]['name'] == plugin
assert json_content['qgis_server']['plugins'][plugin]['version'] == 'not found'

assert len(json_content['fonts']) >= 1
assert len(json_content['qgis_server']['fonts']) >= 1


def test_lizmap_server_info_env_check(client):
Expand Down

0 comments on commit 805c32a

Please sign in to comment.