Opened 15 years ago

Last modified 11 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).

Change History (8)

comment:1 by Caleb Davis, 15 years ago

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/cfdv/mediagoblin/cfdvs-mediagoblin/commit/ca9c7a07b2dc8b4fdb734f3a9e29901e086e86e2](https://gitorious.org/cfdv/mediagoblin/cfdvs-mediagoblin/commit/ca9c7a07b2dc8b4fdb734f3a9e29901e086e86e2)

comment:2 by Christopher Allan Webber, 15 years ago

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 by Elrond, 15 years ago

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 by Caleb Davis, 15 years ago

Owner: set to Caleb Davis

grouping with #391

comment:5 by Caleb Davis, 15 years ago

Milestone: 0.0.3

[https://gitorious.org/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 by Caleb Davis, 15 years ago

I think this one hasn't been closed yet only because #391 was held up.

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

comment:7 by Christopher Allan Webber, 15 years ago

Status: In ProgressClosed

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

comment:8 by Will Kahn-Greene, 14 years ago

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

Note: See TracTickets for help on using tickets.