c2cgeoportal-geoportal 2.8.1.229__py2.py3-none-any.whl → 2.8.1.230__py2.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.
- c2cgeoportal_geoportal/views/fulltextsearch.py +10 -3
- {c2cgeoportal_geoportal-2.8.1.229.dist-info → c2cgeoportal_geoportal-2.8.1.230.dist-info}/METADATA +1 -1
- {c2cgeoportal_geoportal-2.8.1.229.dist-info → c2cgeoportal_geoportal-2.8.1.230.dist-info}/RECORD +6 -6
- {c2cgeoportal_geoportal-2.8.1.229.dist-info → c2cgeoportal_geoportal-2.8.1.230.dist-info}/WHEEL +0 -0
- {c2cgeoportal_geoportal-2.8.1.229.dist-info → c2cgeoportal_geoportal-2.8.1.230.dist-info}/entry_points.txt +0 -0
- {c2cgeoportal_geoportal-2.8.1.229.dist-info → c2cgeoportal_geoportal-2.8.1.230.dist-info}/top_level.txt +0 -0
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) 2011-
|
1
|
+
# Copyright (c) 2011-2025, Camptocamp SA
|
2
2
|
# All rights reserved.
|
3
3
|
|
4
4
|
# Redistribution and use in source and binary forms, with or without
|
@@ -39,6 +39,7 @@ from sqlalchemy import and_, desc, func, or_
|
|
39
39
|
from c2cgeoportal_commons.models import DBSession
|
40
40
|
from c2cgeoportal_commons.models.main import FullTextSearch, Interface
|
41
41
|
from c2cgeoportal_geoportal import locale_negotiator
|
42
|
+
from c2cgeoportal_geoportal.lib import get_roles_id
|
42
43
|
from c2cgeoportal_geoportal.lib.caching import get_region
|
43
44
|
from c2cgeoportal_geoportal.lib.common_headers import Cache, set_common_headers
|
44
45
|
from c2cgeoportal_geoportal.lib.fulltextsearch import Normalize
|
@@ -97,14 +98,20 @@ class FullTextSearchView:
|
|
97
98
|
_filter = FullTextSearch.ts.op("@@")(func.to_tsquery(language, terms_ts))
|
98
99
|
|
99
100
|
if self.request.user is None:
|
100
|
-
_filter = and_(
|
101
|
+
_filter = and_(
|
102
|
+
_filter,
|
103
|
+
or_(
|
104
|
+
FullTextSearch.public.is_(True),
|
105
|
+
FullTextSearch.role_id.in_(get_roles_id(self.request)),
|
106
|
+
),
|
107
|
+
)
|
101
108
|
else:
|
102
109
|
_filter = and_(
|
103
110
|
_filter,
|
104
111
|
or_(
|
105
112
|
FullTextSearch.public.is_(True),
|
106
113
|
FullTextSearch.role_id.is_(None),
|
107
|
-
FullTextSearch.role_id.in_(
|
114
|
+
FullTextSearch.role_id.in_(get_roles_id(self.request)),
|
108
115
|
),
|
109
116
|
)
|
110
117
|
|
{c2cgeoportal_geoportal-2.8.1.229.dist-info → c2cgeoportal_geoportal-2.8.1.230.dist-info}/RECORD
RENAMED
@@ -155,7 +155,7 @@ c2cgeoportal_geoportal/views/__init__.py,sha256=dRkrULopklvgOGEH481Sv381VcwBt9dg
|
|
155
155
|
c2cgeoportal_geoportal/views/dev.py,sha256=e1oZkKwwQvssMOzg3Zao3Jm4WNIFVwEI3EOR1Xj3-_Y,2533
|
156
156
|
c2cgeoportal_geoportal/views/dynamic.py,sha256=dwT2yIBnZYxt7jq3jg5oodU_1MZtjJea0K608lGefhU,8613
|
157
157
|
c2cgeoportal_geoportal/views/entry.py,sha256=eeJ2xpohmG6F9Ujw5L81oD4q8Lu3rWtja3ScO0Mvsfs,5780
|
158
|
-
c2cgeoportal_geoportal/views/fulltextsearch.py,sha256=
|
158
|
+
c2cgeoportal_geoportal/views/fulltextsearch.py,sha256=6njAuNgLgLeZdgOlnlh_Eqp3P6Dt3TLCg_S-8-wV1nM,8536
|
159
159
|
c2cgeoportal_geoportal/views/geometry_processing.py,sha256=LpzAR6RgGS9XfsGLmNqD3dq7ghhZ5Q_eSZgiD8f3XZU,2946
|
160
160
|
c2cgeoportal_geoportal/views/i18n.py,sha256=7Avpt-aVEVlS3SrwtZkvuJ8_0gBZvVrCviyaIZBx7jY,5292
|
161
161
|
c2cgeoportal_geoportal/views/layers.py,sha256=obRfvJE_IhqT0oQdyjv1Lce_KZVb8GWDrkpMZNYqZH0,28773
|
@@ -186,8 +186,8 @@ tests/test_mapserverproxy_route_predicate.py,sha256=SzILSSzIuilzIkUYVPZiVzLwW1du
|
|
186
186
|
tests/test_raster.py,sha256=82NJ2MXgZlMqs0ytN-VgNw376iURdk4PkAg__dyh5ns,11948
|
187
187
|
tests/test_wmstparsing.py,sha256=xjA8nJuXFl3H5Bfs4sJw_8qX8E8qvAALK7Hs2-DTP2A,9054
|
188
188
|
tests/xmlstr.py,sha256=rkTKSU4FGjupBKLx75H8o-goB0KbQrxDvdpc6xVX_uQ,5985
|
189
|
-
c2cgeoportal_geoportal-2.8.1.
|
190
|
-
c2cgeoportal_geoportal-2.8.1.
|
191
|
-
c2cgeoportal_geoportal-2.8.1.
|
192
|
-
c2cgeoportal_geoportal-2.8.1.
|
193
|
-
c2cgeoportal_geoportal-2.8.1.
|
189
|
+
c2cgeoportal_geoportal-2.8.1.230.dist-info/METADATA,sha256=uxFGkPjKx0oXiv5xMhOKm0qP_raqSR1PoU_CIOEqRys,2172
|
190
|
+
c2cgeoportal_geoportal-2.8.1.230.dist-info/WHEEL,sha256=a-zpFRIJzOq5QfuhBzbhiA1eHTzNCJn8OdRvhdNX0Rk,110
|
191
|
+
c2cgeoportal_geoportal-2.8.1.230.dist-info/entry_points.txt,sha256=w0xGr1Bo8q5GBFiP4JgqbSIg-bNhG7bsGoEaGSTfzaE,1415
|
192
|
+
c2cgeoportal_geoportal-2.8.1.230.dist-info/top_level.txt,sha256=PJIbY7Nx51dDrJ052f5mDA7c6Tehm5aD-Gb32L_CtJA,29
|
193
|
+
c2cgeoportal_geoportal-2.8.1.230.dist-info/RECORD,,
|
{c2cgeoportal_geoportal-2.8.1.229.dist-info → c2cgeoportal_geoportal-2.8.1.230.dist-info}/WHEEL
RENAMED
File without changes
|
File without changes
|
File without changes
|