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

[Qgis] Add group support, some fixies #3971

Merged
merged 3 commits into from
Aug 7, 2018
Merged

[Qgis] Add group support, some fixies #3971

merged 3 commits into from
Aug 7, 2018

Conversation

sbrunner
Copy link
Member

@sbrunner sbrunner commented Aug 7, 2018

No description provided.

@sbrunner sbrunner added this to the 2.3 milestone Aug 7, 2018
@sbrunner sbrunner requested a review from pvalsecc August 7, 2018 11:38
@@ -36,7 +36,8 @@ def __init__(self, msg):
class GeoMapFishAccessControl(QgsAccessControlFilter):
""" Implements GeoMapFish access restriction """

EXPRESSION_TYPE = ["GPKG", "PostgreSQL database with PostGIS extension"]
SUBSETSTRING_TYPE = ["GPKG", "PostgreSQL database with PostGIS extension"]
LOCK = Lock()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could be at instance level instead of class level

return self.layers

project_file = self.server_iface.configFilePath()
project = QgsProject()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QgsProject.instance() and you can remove the read.

for name in names:
groups[name].append(layer.name())

new_names = [] + names
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

list(names)

sort_keys=True, indent=4
)
))
self.layers = layers
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not removed by invalidate...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be done in another pull request

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But not using redis. There should be a way to subscribe to a signal that is triggered when the configuration is reloaded...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Humpf, forgot about the GMF DB. For the QgsProjec signal: https://qgis.org/api/classQgsProject.html#a8b66ad18c789739bbd0ab9c16ab9dbe6

for name in groups[group]:
if name not in layers:
layers[name] = []
layers[name].append(layer)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

layers.setdefault(name, []).append(layer)

@camptocamp camptocamp deleted a comment Aug 7, 2018
@sbrunner sbrunner merged commit 62864c0 into 2.3 Aug 7, 2018
@sbrunner sbrunner deleted the qgis branch August 7, 2018 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants