-
Notifications
You must be signed in to change notification settings - Fork 46
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
Conversation
@@ -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() |
There was a problem hiding this comment.
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() |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not removed by invalidate...
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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...
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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)
No description provided.