c2cgeoportal-geoportal 2.9rc113__py3-none-any.whl → 2.9rc115__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2014-2023, Camptocamp SA
1
+ # Copyright (c) 2014-2025, Camptocamp SA
2
2
  # All rights reserved.
3
3
 
4
4
  # Redistribution and use in source and binary forms, with or without
@@ -268,8 +268,13 @@ class Import:
268
268
 
269
269
  @staticmethod
270
270
  def _layer_visible(
271
- layer: "c2cgeoportal_commons.models.main.Layer", role: "c2cgeoportal_commons.models.main.Role"
271
+ layer: "c2cgeoportal_commons.models.main.Layer",
272
+ role: Optional["c2cgeoportal_commons.models.main.Role"],
272
273
  ) -> bool:
274
+ if layer.public:
275
+ return True
276
+ if role is None:
277
+ return False
273
278
  for restrictionarea in layer.restrictionareas:
274
279
  if role in restrictionarea.roles:
275
280
  return True
@@ -281,10 +286,7 @@ class Import:
281
286
  interface: "c2cgeoportal_commons.models.main.Interface",
282
287
  role: Optional["c2cgeoportal_commons.models.main.Role"],
283
288
  ) -> bool:
284
- if role is None:
285
- fill = layer.public and interface in layer.interfaces
286
- else:
287
- fill = interface in layer.interfaces and not layer.public and self._layer_visible(layer, role)
289
+ fill = interface in layer.interfaces and self._layer_visible(layer, role)
288
290
 
289
291
  if fill and self.options.layers:
290
292
  self._add_fts(layer, interface, "add_layer", role)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: c2cgeoportal-geoportal
3
- Version: 2.9rc113
3
+ Version: 2.9rc115
4
4
  Summary: c2cgeoportal geoportal
5
5
  Home-page: https://github.com/camptocamp/c2cgeoportal/
6
6
  Author: Camptocamp
@@ -147,7 +147,7 @@ c2cgeoportal_geoportal/scripts/c2cupgrade.py,sha256=oWgl5ngJaUVXDKJqJ33aZB8ET_Xc
147
147
  c2cgeoportal_geoportal/scripts/create_demo_theme.py,sha256=-SL-fvAPjgiJZEKYcbhXsZm713txhtWQB18X231k6xQ,3263
148
148
  c2cgeoportal_geoportal/scripts/manage_users.py,sha256=Ih3X_V_xUw59Ums4a1x6qQQtz9VtE7PaxAj-tiZIOPg,5586
149
149
  c2cgeoportal_geoportal/scripts/pcreate.py,sha256=xU87K_JYwFE6U4zEGjHvqNj2iiSuAhPkfWMpI576mZ8,11245
150
- c2cgeoportal_geoportal/scripts/theme2fts.py,sha256=Tx1jUfDUwNtwZ5TCyfpldZIbIkzZiQ3dq-kv_YQ9yFE,13737
150
+ c2cgeoportal_geoportal/scripts/theme2fts.py,sha256=tGnwIg3IWEdxXr5OFJeIyErExa-9PS2kPSzPpz_JlXk,13725
151
151
  c2cgeoportal_geoportal/scripts/urllogin.py,sha256=qGOOvx2ZN3qnENGzo8NScRqfFC06l1yc48vU6Qx3MBo,3319
152
152
  c2cgeoportal_geoportal/templates/login.html,sha256=Jy8CUw2KrSviePknsvWJLDqCUXam-vPhnMUv7UcD4Pc,2475
153
153
  c2cgeoportal_geoportal/templates/notlogin.html,sha256=XLCwJ8q7hqk6GIaxwhyMOaMZZZvsD_MMZaCERO8n2AY,1528
@@ -187,8 +187,8 @@ tests/test_mapserverproxy_route_predicate.py,sha256=SzILSSzIuilzIkUYVPZiVzLwW1du
187
187
  tests/test_raster.py,sha256=82NJ2MXgZlMqs0ytN-VgNw376iURdk4PkAg__dyh5ns,11948
188
188
  tests/test_wmstparsing.py,sha256=xjA8nJuXFl3H5Bfs4sJw_8qX8E8qvAALK7Hs2-DTP2A,9054
189
189
  tests/xmlstr.py,sha256=rkTKSU4FGjupBKLx75H8o-goB0KbQrxDvdpc6xVX_uQ,5985
190
- c2cgeoportal_geoportal-2.9rc113.dist-info/METADATA,sha256=tcNFdEgSsJAILEmbiKvB37WLs5iwKTJDrlGisZCRM_s,1887
191
- c2cgeoportal_geoportal-2.9rc113.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
192
- c2cgeoportal_geoportal-2.9rc113.dist-info/entry_points.txt,sha256=3dnX260FsLX_AubeNMdyeta_z1X4CxcD3steAlfPx2I,1414
193
- c2cgeoportal_geoportal-2.9rc113.dist-info/top_level.txt,sha256=PJIbY7Nx51dDrJ052f5mDA7c6Tehm5aD-Gb32L_CtJA,29
194
- c2cgeoportal_geoportal-2.9rc113.dist-info/RECORD,,
190
+ c2cgeoportal_geoportal-2.9rc115.dist-info/METADATA,sha256=Aoqwite_ukN3pyeli6vpRH0dvlbORuZ6qOuyqIWl3ic,1887
191
+ c2cgeoportal_geoportal-2.9rc115.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
192
+ c2cgeoportal_geoportal-2.9rc115.dist-info/entry_points.txt,sha256=3dnX260FsLX_AubeNMdyeta_z1X4CxcD3steAlfPx2I,1414
193
+ c2cgeoportal_geoportal-2.9rc115.dist-info/top_level.txt,sha256=PJIbY7Nx51dDrJ052f5mDA7c6Tehm5aD-Gb32L_CtJA,29
194
+ c2cgeoportal_geoportal-2.9rc115.dist-info/RECORD,,