google-code-export / marinemap

Automatically exported from code.google.com/p/marinemap
Other
1 stars 2 forks source link

Add sharing support to FeatureOptions #442

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Add an option to the features app to enable sharing. Something like 
`share=True` (enabled by default) should:
  * Automate creation of the necessary permissions, so they can be given to groups.
  * Register some urls to a generic view for the sharing form that is presented to users. See the features app documentation on how to setup a generic link. Or look at the implementation of the `copy` generic link.

IIRC, there is a management command needed to setup some sharing fixtures. Can 
this be done away with? I'd like to reduce the number of steps necessary as 
much as possible.

Original issue reported on code.google.com by underbluewaters on 11 Nov 2010 at 11:23

GoogleCodeExporter commented 9 years ago
Sharing is going to need to be completely refactored to support recursive 
containers. I've laid the groundwork for this but it's still very much under 
construction and there are a few brick walls. 

The good news is that the automatic registration of shareables is complete. The 
bad news is that the whole process of registering shareables may need to be 
overhauled to support the nuances of feature collections.

Original comment by perrygeo...@gmail.com on 25 Jan 2011 at 5:51

GoogleCodeExporter commented 9 years ago
Refactored the sharing manager to use Feature collection heirarchies to 
determine possible 'containers'. Side affect is that now sharing is for 
Features only. 

Need to rethink sharing registration process, how other apps interact with 
sharing, sharing of LayerLists, etc

Original comment by perrygeo...@gmail.com on 27 Jan 2011 at 5:19

GoogleCodeExporter commented 9 years ago
A discussion last week concluded that the fine-grained permissions of the 1.X 
sharing app were overkill and added complexity for no apparent gain in the CMS 
branch. Therefore, the new approach will be:

> Any user can create any type of feature. If they belong to a group
> that has sharing turned on, they can share all of their features. If
> they organize their features into collections and share those
> collections, all features in that hierarchy are implicitly shared.

This has been implemented, unit tested and is pretty much ready to go with no 
complicated contenttypes registration crap a greatly simplified sharing API:

    enable_sharing(group1)
    feature1.share_with(group1)
    feature1.is_viewable(user2) # Can user2 see it? Yes if they're part of group1

Only thing left is documentation.

Original comment by perrygeo...@gmail.com on 3 Feb 2011 at 3:24

GoogleCodeExporter commented 9 years ago
rst docs are ready and the api is stable ... lets call it done

Original comment by perrygeo...@gmail.com on 11 Feb 2011 at 12:07