Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

⬆️Bump g3w-client v3.10.6 #986

Closed
wants to merge 21 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
d1c12ba
Apply PR #806
Jun 18, 2024
68823be
update version info
Raruto Jun 21, 2024
5e94481
Feature count refresh (#887) (#893)
github-actions[bot] Jul 3, 2024
1f1763a
Fix check user is a superuser. (#905) (#907)
github-actions[bot] Jul 22, 2024
20def9d
Fix join1:1 with empty prefix (#902) (#909)
github-actions[bot] Jul 23, 2024
97cc8b8
Add 'target' attribute to the Bleach allowed attributes (#911) (#913)
github-actions[bot] Jul 23, 2024
0358aa1
Fix explode_expression (#921) (#923)
github-actions[bot] Aug 2, 2024
6c9f40c
Update French Translation (#925) (#926)
github-actions[bot] Aug 9, 2024
53d3dfd
:arrow_up: Client Dependencies (#924)
volterra79 Aug 14, 2024
b9e8f32
:arrow_up: Client (#927)
volterra79 Aug 16, 2024
fecfa3e
Field default value when they are 0' or 'False' (#933) (#935)
github-actions[bot] Sep 19, 2024
067d14d
Fix ordering expression declaration. (#937) (#940)
github-actions[bot] Sep 24, 2024
1d9361f
⬆️ Bump g3w-client v3.10.3, g3w-client-plugin-editing v3.8.3 (#934)
volterra79 Sep 27, 2024
11d46fc
:arrow_up: Bump g3w-client v3.10.4 (#945)
volterra79 Oct 4, 2024
43af0c0
Add RuleRenderer case. (#946) (#948)
github-actions[bot] Oct 7, 2024
f10552d
Fix 'ghost' layer's vectorjoins management. (#953) (#954)
github-actions[bot] Oct 10, 2024
0e695ce
arcgisvectortile"service" instead of wrong "layer" (#974) (#975)
github-actions[bot] Nov 8, 2024
fa35a92
Update weasyprint to version 63.0 (#978) (#979)
wlorenzetti Nov 26, 2024
2b84089
Filter fields by user on response of /api/vector/data (#980) (#981)
github-actions[bot] Nov 27, 2024
10e4b47
:arrow_up:Bump g3w-client v3.10.5 and g3w-client-plugin-editing v3.8.…
volterra79 Nov 28, 2024
d4fd883
:arrow_up: Client (#983)
volterra79 Dec 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ Software releases follow theese main branches as described in the compatibility

| Branch | Python | Django | QGIS | [client] | First release | Status |
|------------|----------------|----------------|---------------|--------------|---------------|----------------|
| [dev] | 3.10 | 3.2 | 3.34 | dev | Unreleased | ⚠️️ Unstable |
| [v.3.7.x] | 3.10 | 3.2 | 3.34 | 3.9.6 | Dec 2023 | 🪲️ Bug fixing |
| [v.3.6.x] | 3.10 | 3.2 | 3.28 | 3.8.15 | May 2023 | 🪲️ Bug fixing |
| [dev] | 3.10 | 3.2 | 3.34 | dev | Unreleased | ⚠️️ Unstable |
| [v.3.8.x] | 3.10 | 3.2 | 3.34 | 3.10.5 | Nov 2024 | 🪲️ Bug fixing |
| [v.3.7.x] | 3.10 | 3.2 | 3.34 | 3.9.6 | Dec 2023 | 🪲️ Bug fixing |
| [v.3.6.x] | 3.10 | 3.2 | 3.28 | 3.8.15 | May 2023 | 🚨 End of Life |
| [v.3.5.x] | 3.10 | 2.2 | 3.22 | 3.7 | Nov 2022 | 🚨 End of Life |
| [v.3.4.x] | 3.8 | 2.2 | 3.22 | 3.4 | Mar 2022 | 🚨 End of Life |
| [v.3.3.x] | 3.6 | 2.2 | 3.16 | 3.3 | Sep 2021 | 🚨 End of Life |
Expand All @@ -28,6 +29,7 @@ Software releases follow theese main branches as described in the compatibility
| [py2] | 2.7 | 1.11 | [🔗] | | | 🚨 End of Life |

[dev]: https://github.com/g3w-suite/g3w-admin/tree/dev
[v.3.8.x]: https://github.com/g3w-suite/g3w-admin/tree/v.3.8.x
[v.3.7.x]: https://github.com/g3w-suite/g3w-admin/tree/v.3.7.x
[v.3.6.x]: https://github.com/g3w-suite/g3w-admin/tree/v.3.6.x
[v.3.5.x]: https://github.com/g3w-suite/g3w-admin/tree/v.3.5.x
Expand Down Expand Up @@ -220,7 +222,7 @@ Depending on the component you want to translate you can start by consulting one

**Compatibile with:**
[![Django version](https://img.shields.io/badge/Django-3.2-1EB300.svg?style=flat)](https://www.djangoproject.com/download/)
[![QGIS version](https://img.shields.io/badge/QGIS%20LTR-3.28-1EB300.svg?style=flat)](https://www.qgis.org/en/site/forusers/download.html)
[![QGIS version](https://img.shields.io/badge/QGIS%20LTR-3.34-1EB300.svg?style=flat)](https://www.qgis.org/en/site/forusers/download.html)

---

Expand Down
9 changes: 4 additions & 5 deletions ci_scripts/Dockerfile.deps
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,10 @@ RUN apt-get update && apt install -y \
xvfb

# PyQGIS latest version
RUN wget -qO - https://qgis.org/downloads/qgis-2022.gpg.key | \
gpg --no-default-keyring --keyring gnupg-ring:/etc/apt/trusted.gpg.d/qgis-archive.gpg --import && \
chmod a+r /etc/apt/trusted.gpg.d/qgis-archive.gpg && \
echo "deb [arch=amd64] https://qgis.org/ubuntu jammy main" >> /etc/apt/sources.list && \
apt update && apt install -y python3-qgis qgis-server
RUN curl -sS https://download.qgis.org/downloads/qgis-archive-keyring.gpg > /etc/apt/keyrings/qgis-archive-keyring.gpg && \
echo "deb [signed-by=/etc/apt/keyrings/qgis-archive-keyring.gpg] https://qgis.org/ubuntu jammy main" | \
tee /etc/apt/sources.list.d/qgis.list && \
apt-get update && apt-get install -y python3-qgis qgis-server

# Yarn

Expand Down
11 changes: 5 additions & 6 deletions ci_scripts/Dockerfile.ltr.deps
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,11 @@ RUN apt-get update && apt install -y \
dirmngr \
xvfb

# PyQGIS 3.28
RUN wget -qO - https://qgis.org/downloads/qgis-2022.gpg.key | \
gpg --no-default-keyring --keyring gnupg-ring:/etc/apt/trusted.gpg.d/qgis-archive.gpg --import && \
chmod a+r /etc/apt/trusted.gpg.d/qgis-archive.gpg && \
echo "deb [arch=amd64] https://qgis.org/ubuntu-ltr jammy main" >> /etc/apt/sources.list && \
apt update && apt install -y python3-qgis qgis-server
# PyQGIS
RUN curl -sS https://download.qgis.org/downloads/qgis-archive-keyring.gpg > /etc/apt/keyrings/qgis-archive-keyring.gpg && \
echo "deb [signed-by=/etc/apt/keyrings/qgis-archive-keyring.gpg] https://qgis.org/ubuntu-ltr jammy main" | \
tee /etc/apt/sources.list.d/qgis.list && \
apt-get update && apt-get install -y python3-qgis qgis-server

# Yarn
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
Expand Down
5 changes: 4 additions & 1 deletion ci_scripts/setup_suite.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ if [ ! -e ${SETUP_DONE_FILE} ]; then
ls ${PROJECTS_DIR} || mkdir ${PROJECTS_DIR}
ls ${DATASOURCE_PATH} || mkdir ${DATASOURCE_PATH}

wait-for-it -h ${G3WSUITE_POSTGRES_HOST:-postgis} -p ${G3WSUITE_POSTGRES_PORT:-5432} -t 60
until pg_isready -h ${G3WSUITE_POSTGRES_HOST:-postgis} -p ${G3WSUITE_POSTGRES_PORT:-5432}; do
echo "wait 30s until is ready"
sleep 30;
done

pushd .
cd ${DJANGO_DIRECTORY}/core/static
Expand Down
2 changes: 0 additions & 2 deletions docker-compose.latest.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Use QGIS latest release

version: "3"
services:
postgis:
image: g3wsuite/postgis:11.0-2.5
Expand Down
1 change: 0 additions & 1 deletion docker-compose.ltr.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: '3'
services:
postgis:
image: g3wsuite/postgis:11.0-2.5
Expand Down
2 changes: 1 addition & 1 deletion g3w-admin/base/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@
BLEACH_ALLOWED_TAGS = ['p', 'b', 'i', 'u', 'em', 'strong', 'a', 'br', 'table', 'tr', 'td', 'th', 'b', 'ul', 'li', 'ol',
'div', 'h1', 'h2', 'h3', 'h4', 'h5', 'pre', 'blockquote', 'tbody', 'theader', 'tfooter', 'span']
BLEACH_STRIP_TAGS = True
BLEACH_ALLOWED_ATTRIBUTES = ['href', 'title', 'style', 'src']
BLEACH_ALLOWED_ATTRIBUTES = ['href', 'title', 'style', 'src', 'target']
BLEACH_ALLOWED_STYLES = [
'background-color', 'color', 'font-size'
]
Expand Down
2 changes: 1 addition & 1 deletion g3w-admin/client/static/client/css/app.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion g3w-admin/client/static/client/js/app.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion g3w-admin/client/static/client/js/app.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion g3w-admin/client/static/client/js/vendor.min.js

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions g3w-admin/core/api/base/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,18 @@ def response_config_mode(self, request):
'fields': fields,
}

# Filter fields by user
if self.request.user:
visiblefields = self.layer.visible_fields_for_user(self.request.user)
if len(visiblefields) != len(vector_params['fields']):
newfields = []
for f in vector_params['fields']:
if f['name'] in visiblefields:
newfields.append(f)

if newfields:
vector_params['fields'] = newfields

# post_create_maplayerattributes signal
post_create_maplayerattributes.send(
self, layer=self.layer, vector_params=vector_params)
Expand Down
4 changes: 3 additions & 1 deletion g3w-admin/core/api/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,10 @@ def apply_filter(self, request, metadata_layer, qgis_feature_request, view):
if not self._is_valid_field(qgis_layer, ordering, view):
continue

# Because the fields inside a QGIS expression must be declared inside
# the expression string with the double brackets ("field_name")
ordering_rules.append(QgsFeatureRequest.OrderByClause(
ordering, ascending))
f'"{ordering}"', ascending))

if ordering_rules:
order_by = QgsFeatureRequest.OrderBy(ordering_rules)
Expand Down
6 changes: 3 additions & 3 deletions g3w-admin/core/utils/structure.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import copy

from qgis.core import QgsFieldConstraints, Qgis, QgsExpression, QgsExpressionNode
from qgis.PyQt.QtCore import QVariant, QDate, QDateTime
from qgis.PyQt.QtCore import QVariant, QDate, QDateTime, NULL

# relations data type
RELATIONS_ONE_TO_ONE = 'ONE'
Expand Down Expand Up @@ -128,7 +128,7 @@ def editingFormField(fieldName, type=FIELD_TYPE_STRING, editable=True, required=
if required:
ret['validate']['required'] = True

if 'default' in kwargs and kwargs['default']:
if 'default' in kwargs and kwargs['default'] is not None:
ret['input']['options']['default'] = kwargs['default']

if inputType in (FORM_FIELD_TYPE_LAYERPICKER, ) and 'pickerdata' in kwargs:
Expand Down Expand Up @@ -269,7 +269,7 @@ def mapLayerAttributesFromQgisLayer(qgis_layer, **kwargs):

# default value for editing from qgis_layer
if 'default' not in kwargs:
default_value = qgis_layer.defaultValue(field_index) if qgis_layer.defaultValue(field_index) \
default_value = qgis_layer.defaultValue(field_index) if qgis_layer.defaultValue(field_index) not in (None, NULL) \
else None
else:
default_value = kwargs['default']
Expand Down
12 changes: 8 additions & 4 deletions g3w-admin/editing/api/base/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
EDITING_POST_DATA_UPDATED)
from editing.utils import LayerLock
from editing.utils.data import clear_session_for_uploaded_files
from qdjango.apps import get_qgs_project
from qdjango.apps import get_qgs_project, remove_project_from_cache
from qdjango.models import Layer
from qdjango.utils.data import QGIS_LAYER_TYPE_NO_GEOM
from qdjango.utils.validators import feature_validator
Expand Down Expand Up @@ -526,8 +526,8 @@ def response_commit_mode(self, request):
qgis_layer = self.metadata_layer.qgis_layer

# Get the project
qgis_project = get_qgs_project(Layer.objects.get(
pk=self.metadata_layer.layer_id).project.qgis_file.path)
project = Layer.objects.get(pk=self.metadata_layer.layer_id).project
qgis_project = get_qgs_project(project.qgis_file.path)

# Check if we have transaction groups activated
# Performs all operations in the editing buffer if we have transactions
Expand Down Expand Up @@ -653,9 +653,13 @@ def save_relation(post_relation_data, referencing_layer, ref_insert_ids) -> None
except:
pass

# clear file uploaded and reset session
# Clear file uploaded and reset session
clear_session_for_uploaded_files(request)

# Invalidate /api/config cache e invalidate QGIS project cache
project.invalidate_cache()
qgis_project.read(project.qgis_file.path)


def response_unlock_mode(self, request):
"""
Expand Down
4 changes: 2 additions & 2 deletions g3w-admin/editing/static/editing/js/plugin.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions g3w-admin/editing/static/editing/js/plugin.js.map

Large diffs are not rendered by default.

This file was deleted.

Binary file modified g3w-admin/locale/fr/LC_MESSAGES/django.mo
Binary file not shown.
Loading
Loading