#8583 closed enhancement (fixed)
[patch] You can't delete a PDF attachment when PDFRedirector is enabled.
Reported by: | Owned by: | Ryan J Ollos | |
---|---|---|---|
Priority: | normal | Component: | PdfRedirectorPlugin |
Severity: | normal | Keywords: | attachment delete |
Cc: | Michael Renzmann | Trac Release: | 0.11 |
Description (last modified by )
How can i delete a PDF attachment when PDFRedirector is enabled ? The only work around I found is:
- Disabling the PDFRedirector Plugin in the Admin page
- Showing the attachment preview page that contains the Delete button and deleting the attachment
- Re-enabling the plugin.
Note that you need TRAC_ADMIN permission to do that.
I would like an easier way to delete PDF attachments, not requiring high level permissions.
Attachments (0)
Change History (5)
comment:1 Changed 13 years ago by
Cc: | Ryan J Ollos added; anonymous removed |
---|---|
Keywords: | attachment delete added |
Summary: | You can't delete a PDF attachment when PDFRedirector is enabled. → [patch] You can't delete a PDF attachment when PDFRedirector is enabled. |
comment:2 Changed 13 years ago by
Cc: | Michael Renzmann added |
---|
I'm asking kindly for patch review, or permission to do a non-maintainer-upload of this change, in case the plugin author is incapable of devoting the time needed for doing this alone, or if unresponsive/unavailable much longer. What do you think?
Side-note: Another occasion, that make me think about an explicit policy for non-maintainer interception in case of security considerations or overdue issues without response from author/last maintainer, similar to AdoptingHacks, but without expressed desire to permanently take-over control and responsibility - our pending QA team approach.
comment:3 Changed 12 years ago by
Cc: | Ryan J Ollos removed |
---|---|
Description: | modified (diff) |
Owner: | changed from Nicholas Bergson-Shilcock to Ryan J Ollos |
Status: | new → assigned |
I'm using this plugin now, so decided to go ahead and fix this. It is working with 1.0dev, so I've added the 0.12 and 1.0 tags to the project wiki page.
comment:4 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:5 Changed 12 years ago by
I think the request in this ticket was satisfied, so I've closed it. What would really make the plugin useful though, would be to find someway to implement #5710. Then, we could still have a Delete button at the bottom of the page in which PDF is rendered.
Replying to lburaggi@mate.it:
Glad you ask. Bit me too. I was just looking for a place to add the fix I worked out tonight.
Not true. Actually permission required are (from
trac.attachment.LegacyAttachmentPolicy
) defined as following:so this it's depending on the parent resource's realm the file is attached to.
TRACK_ADMIN
does work too because it simply inherits any permission defined on the current system, weather defined in Trac core or a plugin.See before.
True, there is no
ATTACHMENT_DELETE
or evenATTACHMENT_ADMIN
for convenience, maybe on-purpose.? You could ask at the trac-dev mailing-list, if you care. At least it's a reasonable default, matching the unwritten "feature-rich might be feature-bloat" policy of Trac nicely, you see? I like the low-fuss concept, so that still works-for-me.Well, the fix, right? Alter the plugin source like so:
pdfredirector/pdfredirector.py
:Now it's at least possible to delete again by regular web-UI access via URL query args:
Means no <Delete> button (yet) like on preview page for other attachments, just pure functionality, sorry. A more elaborated way to access the delete functionality might follow. Needed?