Re: [Snowy] Note sharing with other users - Plan of attack



Good stuff.  Some comments below.

On Thu, Oct 7, 2010 at 8:40 PM, Jeff Schroeder
<jeffschroeder computer org> wrote:
> Instead of making notes completely private or wide open to the world,
> lets go one step further and share notes with specific people.
> Jean-François Fortin Tam (aka Jeff) did some pretty[1] mockups[2]
> which inspired me to think about implementing his sharing[3]
> interface.
>
> The proposed implementation doesn't require sql schema changes and
> only needs a small model change:
> ====================================
> diff --git a/notes/models.py b/notes/models.py
> index af5bd1b..1aa77d3 100644
> --- a/notes/models.py
> +++ b/notes/models.py
> @@ -27,6 +27,7 @@ from snowy.notes.managers import NoteManager
>  class Note(models.Model):
>     NOTE_PERMISSIONS = (
>         (0, _(u'Private')), (1, _(u'Public')),
> +        (2, _(u'Shared'))
>     )
>
>     guid = models.CharField(max_length=36)
> ====================================

We could conceivably simplify this even more.  We could simply have a
boolean field indicating whether a note is public.  If it is not
public, then system:sharing:read*:user email com would be checked.

Then we could add a public field to the Note object in the API spec (I
forget if this is already in the draft; l.g.o is down right now).

Is there something I'm not thinking of that would cause this approach
not to work?

> If a note's permission attribute is set to 2, allow attaching a
> NoteTag with the email address of the person to share with.
>
> The sharing tag's name would look something like this on the backend:
> system:sharing:readonly:user email com

Why readonly?  Why not read?  Were you thinking of having readonly,
edit, and readedit or something?  It seems easier to just have read
and edit, as separate tags.

Sandy


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]