-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Any user can save changes to a layer's existing style(s) #134
Comments
Wrote some preliminary code for Worldmap to prevent the 'Styles' tab from appearing in the Layer Properties window unless the user has edit permission for the layer: |
This requires either a deep change in GeoServer to allow more granular permissions on configuration, or a shallower change to handle these permissions in the Django app. Need to see if GeoServer development on this is feasible (organizationally). The Django app is the wrong place for this. |
Actually now that I think about it we could do this on the Django side - since we don't have the ability to grant users admin privileges on a subset of GeoServer's configured layers, ALL admin requests are made by having the Django app proxy the request. We could just make the Django app a little smarter about figuring out what styles can be edited by a particular user. (btw earlier comment was that the Django app was the wrong place to store styles, not necessarily that it was a bad place to apply security restrictions) |
It's not clear where to implement this. Ideally it would be in the GeoServer configuration... waiting for some sort of confirmation on that from a core GeoServer dev. |
#983 is a duplicate of this issue and has some more discussion. |
Is this a real 2.0 bug? |
+1 to define the permissions in the layers.models.style model. |
For a version 1 cut at this (to get it into 2.0), the permissions could be implicit - if the user can modify the layer, they can modify the style. The client still needs work and the proxy view would also need to enforce this rule. |
This should be addressed as part of the Permissions GNIP : #255 |
If someone wants to write unit tests demonstrating the failure be our guest :) |
Added the test required by @ingenieroariel in #134
Any updates on this issue? The preservation of default styles would be really helpful. |
@tjk1k this is another issue, and is fixed. If you have some kind of problems with preservation of default styles (I am not sure what kind of problem, need more details), please file another ticket. |
@capooti Same issue, I believe. I was considering any style created by the 'owner' of a layer to be the default style (for all users) and would like to keep others from changing (breaking) it. |
but this is working now, the test is there to prove it. In case you don't want an user to edit a style just remove from him the change_layer_style permission. Are you talking of master, correct? |
@capooti also, which version is this issue fixed on? |
it is on master, the change_layer_style permission is not available in On Tue, Dec 2, 2014 at 3:04 PM, tjk1 [email protected] wrote:
Paolo Corti |
Excellent, thanks for the help |
Can we close this now? |
yes. please do it
|
Version Tag Requirements
WIP Fix GeoNode#133 - Remove arrow function from template
Any user can edit and save changes to a layer's style(s). This can lead to unwanted changes in the maps of other users that display the layer. Maybe the ability to edit layer styles should be limited to users who have read/write or admin permission for the layer itself.
The text was updated successfully, but these errors were encountered: