After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 625231 - When viewing another user's note collection, show username somewhere other than URL
When viewing another user's note collection, show username somewhere other th...
Status: RESOLVED FIXED
Product: snowy
Classification: Deprecated
Component: general
git master
Other All
: Normal normal
: 1.0 (public beta)
Assigned To: snowy-maint
snowy-maint
Depends on:
Blocks:
 
 
Reported: 2010-07-25 12:56 UTC by Sandy Armstrong
Modified: 2011-01-05 01:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
read the description (1.19 KB, patch)
2011-01-04 06:29 UTC, Jeff Schroeder
committed Details | Review

Description Sandy Armstrong 2010-07-25 12:56:35 UTC
Currently if I visit /someuserthatisnotme/notes, I see my own username and avatar in the upper-right corner, but nowhere do I see those for the user whose notes I'm viewing.
Comment 1 Jeff Schroeder 2010-08-10 04:34:26 UTC
Perhaps this could be implemented as breadcrumbs? Then it would be easy (and generic) to implement for notes/notebooks for the current user or any other user

When logging in and going to a note or notebook it would show:
notes >> NoteTitle
notebooks >> Some Notebook Name

When trying to hax0r your account by looking at your public notes it would look like this:
sandy >> notebooks >> taking over the world

or:
sandy >> notes >> lady gaga playlist

It should be pretty easy to implement something along these lines with some template inheritance and {{ block.super }} magic. I've done this before.
Comment 2 Sandy Armstrong 2010-08-10 05:05:46 UTC
That sounds like a reasonable approach to me. Solves a few problems at once.

Maybe it would look cool if it was:

[tiny gravatar] sandy >> [notebook icon] recipes >> [note icon] apple cake

If we ever wanted to trim down our presentation, this could replace the entire top header area.
Comment 3 Stefan Schweizer 2010-10-30 13:03:43 UTC
Is it possible to read another user's notes if I know his username? I got a little concerned when reading this bug's summary. Or does that only work for public notes?
Comment 4 Sandy Armstrong 2010-10-30 13:19:42 UTC
Stefan, you can only read another user's notes if the notes are marked public (not exposed in the UI yet).  All notes are private by default.

We will be adding more fine-grained per-user sharing in the future as well.

The only people who can read your notes, unless we have some security bug I don't know about, are admins who have access to the database.
Comment 5 Jeff Schroeder 2011-01-04 06:29:13 UTC
Created attachment 177455 [details] [review]
read the description

Tested in the following scenarios:
    - request.user == author && note is not in a notebook
    - request.user == author && note is in a notebook
    - request.user != author && note is not in a notebook
    - request.user != author && note is in a notebook

Does anyone have a better idea instead of:
{{ author.username }}'s Notes

I'm not sure that the 's will translate properly, but the django pluralize filter won't really work in this case.
Comment 6 Sandy Armstrong 2011-01-04 11:40:38 UTC
Review of attachment 177455 [details] [review]:

Nice. One minor thing to fix before pushing, otherwise I'm marking as "commit now".

::: notes/templates/notes/note_detail.html
@@ +79,2 @@
     <tr><td>
+        <span id="breadcrumb">{% if request.user != author %}<a href="{% url user_index author.username %}">{{ author.username }}{% trans "'s" %}</a> {% trans "Notes" %} &raquo; {% endif %}{% if notebook %}{{ notebook|safe }} &raquo; {% endif %}{{ title|safe }}</span>

This isn't the best way to do the the l10n here, but since we may change this part of the design I don't want to worry about it just yet.

However, if you could dump a comment here saying something like "FIXME: proper l10n" that would be a good reminder.
Comment 7 Jeff Schroeder 2011-01-05 01:01:54 UTC
Added line for FIXME and pushed.