Edgewall Software
Modify

Ticket #5945 (closed defect: duplicate)

Opened 4 years ago

Last modified 4 years ago

upgrading to 0.11dev breaks attachment access

Reported by: richard.musil@… Owned by: cboos
Priority: normal Milestone:
Component: wiki system Version: devel
Severity: normal Keywords:
Cc:
Release Notes:
API Changes:

Description

I have been running 0.10.4 on my setup. After upgrading to 0.11dev I cannot see attachments on wiki pages. If there is direct link to an attachment and I click on that link I got "you do not have sufficient permission".
Also buttons for Add Attachment at the bottom of the page are gone. I guess it is related to new ATTACHMENT_* permission, however there is still some quirk there, because I have TRAC_ADMIN permision myself.

Also documentation or Admin module do not mention any ATTACHMENT_* type.

Attachments

attachment.py.patch (465 bytes) - added by jonathan.needle@… 4 years ago.

Download all attachments as: .zip

Change History

comment:1 follow-up: Changed 4 years ago by jonathan.needle@…

Looks like the problem is in source:/trunk/trac/attachment.py@5981#L700

It never actually returns 'decision' to the caller. Making the following change fixes it for me.

  self.env.log.debug('LegacyAttachmentPolicy denied %s '
                     'access to %s. User needs %s' %
                     (username, context, legacy_action))
else:
  return decision

fixes it for me.

Regards,

Jon.

Changed 4 years ago by jonathan.needle@…

comment:2 in reply to: ↑ 1 Changed 4 years ago by richard.musil@…

Replying to jonathan.needle@adare.com:

Looks like the problem is in source:/trunk/trac/attachment.py@5981#L700

It never actually returns 'decision' to the caller. Making the following change fixes it for me.

Yep, if fixes it for me as well. Thanks for patch :). Now if anyone just check it in.

comment:3 Changed 4 years ago by athomas

  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #5956, fixed in r5983.

comment:4 follow-up: Changed 4 years ago by dekimsey@…

  • Keywords attachment button added
  • Resolution duplicate deleted
  • Status changed from closed to reopened

In revision 6255 of 0.11dev, we have run into a similiar problem. Specifically with respect to the "Add attachment" button not being displayed on wiki pages. After reviewing this bug, we enabled logging and saw the following:

2007-11-30 13:09:08,335 Trac[__init__] DEBUG: Prepare chrome data for request
2007-11-30 13:09:08,345 Trac[__init__] DEBUG: Updating wiki page index
2007-11-30 13:09:08,350 Trac[__init__] DEBUG: DefaultPermissionPolicy denies dekimsey performing ATTACHMENT_CREATE on <Resource u'wiki:WikiFormatting, attachment'>
2007-11-30 13:09:08,452 Trac[__init__] DEBUG: Retrieving session for ID 'dekimsey'
2007-11-30 13:09:08,873 Trac[__init__] DEBUG: Executing Wiki macro TracGuideToc by provider <trac.wiki.macros.TracGuideTocMacro object at 0xb794eccc>

The user 'dekimsey' is part of the TRAC_ADMIN group.

URL: https://svn.edgewall.org/repos/trac/trunk
Repository Root: https://svn.edgewall.org/repos/trac
Repository UUID: af82e41b-90c4-0310-8c96-b1721e28e2e2
Revision: 6255
Node Kind: directory
Schedule: normal
Last Changed Author: athomas
Last Changed Rev: 6254
Last Changed Date: 2007-11-29 08:40:58 -0500 (Thu, 29 Nov 2007)

comment:5 in reply to: ↑ 4 ; follow-up: Changed 4 years ago by osimons

  • Keywords attachment button removed
  • Resolution set to duplicate
  • Status changed from reopened to closed

Replying to dekimsey@gmail.com:

In revision 6255 of 0.11dev, we have run into a similiar problem. Specifically with respect to the "Add attachment" button not being displayed on wiki pages.

That was fixed in [6259]. Please update and verify.

Resetting to last closed status.

comment:6 in reply to: ↑ 5 Changed 4 years ago by anonymous

Replying to osimons:

Replying to dekimsey@gmail.com:

In revision 6255 of 0.11dev, we have run into a similiar problem. Specifically with respect to the "Add attachment" button not being displayed on wiki pages.

That was fixed in [6259]. Please update and verify.

Resetting to last closed status.

Yup, that was the issue, we had just found the solution ourselves a moment ago, thanks for the help!

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
to The owner will be changed from cboos. Next status will be 'closed'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.