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

Any user can save changes to a layer's existing style(s) #134

Closed
dwins opened this issue Jan 28, 2011 · 19 comments
Closed

Any user can save changes to a layer's existing style(s) #134

dwins opened this issue Jan 28, 2011 · 19 comments
Assignees
Milestone

Comments

@dwins
Copy link
Contributor

dwins commented Jan 28, 2011

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.

@mbertrand
Copy link
Member

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:

cga-harvard@43a3772

cga-harvard/geonode-client@39e8287#L0L986

@sbenthall
Copy link
Contributor

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.

@ingenieroariel
Copy link
Member

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)

@sbenthall
Copy link
Contributor

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.

@ahocevar
Copy link
Member

#983 is a duplicate of this issue and has some more discussion.

@ghost ghost assigned jj0hns0n Jul 27, 2012
@simod
Copy link
Member

simod commented Jun 6, 2013

Is this a real 2.0 bug?
We think we could move this to the 2.1 for now as the styles can be changed by registered users.
A good solution couldbe the one proposed by Ariel, the permissions can be defined them on the layers.models.style model.

@capooti
Copy link
Member

capooti commented Jul 1, 2013

+1 to define the permissions in the layers.models.style model.
Any chance this could be implemented for 2.0?
thanks

@ischneider
Copy link
Member

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.

@ingenieroariel
Copy link
Member

This should be addressed as part of the Permissions GNIP : #255

@ingenieroariel
Copy link
Member

If someone wants to write unit tests demonstrating the failure be our guest :)

@ingenieroariel ingenieroariel modified the milestone: 2.1 Apr 16, 2014
capooti added a commit to capooti/geonode that referenced this issue Nov 28, 2014
@jean jean assigned capooti and unassigned jj0hns0n Nov 28, 2014
simod added a commit that referenced this issue Dec 1, 2014
@tjk1
Copy link

tjk1 commented Dec 1, 2014

Any updates on this issue? The preservation of default styles would be really helpful.

@capooti
Copy link
Member

capooti commented Dec 2, 2014

@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.

@tjk1
Copy link

tjk1 commented Dec 2, 2014

@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.

@capooti
Copy link
Member

capooti commented Dec 2, 2014

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?

@tjk1
Copy link

tjk1 commented Dec 2, 2014

@capooti also, which version is this issue fixed on?

@capooti
Copy link
Member

capooti commented Dec 2, 2014

it is on master, the change_layer_style permission is not available in
GeoNode 2.0.
Therefore you will be able to use with next GeoNode 2.4 (of using the trunk)

On Tue, Dec 2, 2014 at 3:04 PM, tjk1 [email protected] wrote:

@capooti https://github.com/capooti also, which version is this issue
fixed on?


Reply to this email directly or view it on GitHub
#134 (comment).

Paolo Corti
Geospatial software developer
web: http://www.paolocorti.net
twitter: @capooti
skype: capooti

@tjk1
Copy link

tjk1 commented Dec 2, 2014

Excellent, thanks for the help

@jj0hns0n
Copy link
Contributor

Can we close this now?

@capooti
Copy link
Member

capooti commented Jan 12, 2015

yes. please do it
On Jan 12, 2015 9:02 PM, "Jeffrey Johnson" [email protected] wrote:

Can we close this now?


Reply to this email directly or view it on GitHub
#134 (comment).

goudine pushed a commit to goudine/geonode that referenced this issue Feb 1, 2018
travislbrundage pushed a commit to travislbrundage/geonode that referenced this issue Feb 9, 2018
marthamareal pushed a commit to marthamareal/geonode that referenced this issue Sep 24, 2021
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

No branches or pull requests