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



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)
====================================

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

If we never plan to add editing or other crazy functionality this
would be easy to extend:
system:sharing:edit:user email com

Letting other users edit a shared note is outside the scope of this
proposal, but is something to think about. Sandy pointed out this adds
an database lookup per note. That happens when compiling a total list
of notes a user can see from another user. Clients that don't have
this functionality should simply ignore a few extra tags and keep on
keepin' on.

Comments, suggestions, cash donations? I'd like to give a go at
implementing this or something similar.

[1] http://live.gnome.org/Snowy/DesignerPlayground?action=AttachFile&do=view&target=mockup-nekohayo-list.png
[2] http://live.gnome.org/Snowy/DesignerPlayground?action=AttachFile&do=view&target=mockup-nekohayo-editing.png
[3] http://live.gnome.org/Snowy/DesignerPlayground?action=AttachFile&do=view&target=mockup-nekohayo-sharing.png

-- 
Jeff Schroeder

Don't drink and derive, alcohol and analysis don't mix.
http://www.digitalprognosis.com


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