Opened 12 years ago

Last modified 8 years ago

#101 closed defect (FIXED)

Edit should only show up for media owner

Reported by: Jef van Schendel Owned by: Caleb Davis
Priority: minor Milestone: 0.0.3
Component: programming Keywords:
Cc: Parent Tickets:

Description

On any media page, the text says "Upload on X by X" and then shows
an "Edit" link.

This link shows up for anyone, but it should only be visible if
you're the owner of that piece of media and are logged in (and thus
are the only one that can actually edit it).



Subtickets

Change History (8)

comment:1 Changed 12 years ago by Caleb Davis

The Edit display link was not conditioned on anything, so I went
ahead and verified that the logged-in user was also the
media.uploader.
[https://gitorious.org/\ :sub:`cfdv/mediagoblin/cfdvs-mediagoblin/commit/ca9c7a07b2dc8b4fdb734f3a9e29901e086e86e2](https://gitorious.org/`\ cfdv/mediagoblin/cfdvs-mediagoblin/commit/ca9c7a07b2dc8b4fdb734f3a9e29901e086e86e2)



comment:2 Changed 12 years ago by Christopher Allan Webber

Status: NewClosed
Thanks, I merged and pushed! I also changed the check to be based
on the userid which is stored in the model, not a huge change.
Thanks again!



comment:3 Changed 12 years ago by Elrond

Status: ClosedIn Progress
admins should also see the link.

user.is\_admin might be the thing to check. Which is probably okay
until the magical "permissions".

With "permissions" a function "may\_edit()" is probably better.



comment:4 Changed 12 years ago by Caleb Davis

Owner: set to Caleb Davis
grouping with `#391 </issues/391>`_



comment:5 Changed 12 years ago by Caleb Davis

Milestone: 0.0.3
[https://gitorious.org/\ :sub:`cfdv/mediagoblin/cfdvs-mediagoblin/commits/b388+b391\_admin\_can\_edit\_user\_profile](https://gitorious.org/`\ cfdv/mediagoblin/cfdvs-mediagoblin/commits/b388+b391\_admin\_can\_edit\_user\_profile)

I changed the conditional to reflect this decision.

The issue seems like it's nearly resolved, so I added the 0.0.3 tag
to make the roadmap more impressive :P



comment:6 Changed 12 years ago by Caleb Davis

I think this one hasn't been closed yet only because
`#391 </issues/391>`_ was held up.

[https://gitorious.org/\ :sub:`cfdv/mediagoblin/cfdvs-mediagoblin/commit/e192d7b7a55efdfd2f50f5d068a0dfa484e152fa](https://gitorious.org/`\ cfdv/mediagoblin/cfdvs-mediagoblin/commit/e192d7b7a55efdfd2f50f5d068a0dfa484e152fa)



comment:7 Changed 12 years ago by Christopher Allan Webber

Status: In ProgressClosed
Well that's merged, so this is resolved here too :)



comment:8 Changed 11 years ago by Will Kahn-Greene

The original url for this bug was http://bugs.foocorp.net/issues/388 .

Note: See TracTickets for help on using tickets.