Modify

Opened 12 years ago

Last modified 4 years ago

#10228 new defect

Deadlock running along with PrivateTicketsPlugin

Reported by: hjuergs@… Owned by:
Priority: high Component: SensitiveTicketsPlugin
Severity: blocker Keywords:
Cc: Trac Release: 0.12

Description

This pluging has worked very fine for a long time.

After addionally installing PrivateTicketsPlugin we face a

RuntimeError: maximum recursion depth exceeded

The error occures trying to get the timeline or an report. Here is the python traceback from "report":

Most recent call last:

    File "/usr/lib/python2.5/site-packages/trac/web/main.py", line 450, in _dispatch_request
    File "/usr/lib/python2.5/site-packages/trac/web/main.py", line 206, in dispatch
    File "/usr/lib/python2.5/site-packages/trac/ticket/report.py", line 105, in process_request
    File "/usr/lib/python2.5/site-packages/trac/ticket/report.py", line 441, in _render_view
    File "/usr/lib/python2.5/site-packages/trac/perm.py", line 527, in has_permission
    File "/usr/lib/python2.5/site-packages/trac/perm.py", line 541, in _has_permission
    File "/usr/lib/python2.5/site-packages/trac/perm.py", line 428, in check_permission
    File "/usr/lib/python2.5/site-packages/sensitivetickets-0.11r1-py2.5.egg/sensitivetickets/sensitivetickets.py", line 56, in check_permission
    Code fragment:
        sensitive = ticket['sensitive']
        except ResourceNotFound:
        sensitive = 1 # Fail safe to prevent a race condition.
         
        if sensitive and int(sensitive):
        if 'SENSITIVE_VIEW' not in perm:
        return False
         
        # IPermissionRequestor methods
         
        def get_permission_actions(self):
    Local variables:
    Name	Value
    action 	'TICKET_VIEW'
    perm 	<trac.perm.PermissionCache object at 0x8de81e4>
    resource 	<Resource u'ticket:52'>
    self 	<sensitivetickets.sensitivetickets.SensitiveTicketsPolicy object at ...
    sensitive 	u'1'
    ticket 	<trac.ticket.model.Ticket object at 0x8df550c>
    username 	u'user'
    File "/usr/lib/python2.5/site-packages/trac/perm.py", line 527, in has_permission
    File "/usr/lib/python2.5/site-packages/trac/perm.py", line 541, in _has_permission
    File "/usr/lib/python2.5/site-packages/trac/perm.py", line 428, in check_permission
    File "build/bdist.linux-i686/egg/privatetickets/policy.py", line 34, in check_permission
    File "/usr/lib/python2.5/site-packages/trac/perm.py", line 527, in has_permission
    File "/usr/lib/python2.5/site-packages/trac/perm.py", line 541, in _has_permission
    File "/usr/lib/python2.5/site-packages/trac/perm.py", line 428, in check_permission
    File "/usr/lib/python2.5/site-packages/sensitivetickets-0.11r1-py2.5.egg/sensitivetickets/sensitivetickets.py", line 56, in check_permission
    File "/usr/lib/python2.5/site-packages/trac/perm.py", line 527, in has_permission
    File "/usr/lib/python2.5/site-packages/trac/perm.py", line 541, in _has_permission
    File "/usr/lib/python2.5/site-packages/trac/perm.py", line 428, in check_permission
    File "build/bdist.linux-i686/egg/privatetickets/policy.py", line 34, in check_permission
    File "/usr/lib/python2.5/site-packages/trac/perm.py", line 527, in has_permission
    File "/usr/lib/python2.5/site-packages/trac/perm.py", line 541, in _has_permission
    File "/usr/lib/python2.5/site-packages/trac/perm.py", line 428, in check_permission
    File "/usr/lib/python2.5/site-packages/sensitivetickets-0.11r1-py2.5.egg/sensitivetickets/sensitivetickets.py", line 56, in check_permission
...

The user has TRAC_ADMIN permission.

Trying to change the order in the

permission_policies = PrivateWikiSystem, PrivateTicketsPolicy, SensitiveTicketsPolicy, DefaultPermissionPolicy, LegacyAttachmentPolicy

had no effekt...

I'm not shure where the problem is located. Disabling the SensitivTicketsPolicy stops the deadlock.

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20100101 Firefox/12.0
Trac: 	0.11.6
Python: 	2.5.2 (r252:60911, Jan 24 2010, 15:24:24) [GCC 4.3.2]
setuptools: 	0.6c11
SQLite: 	3.5.9
pysqlite: 	2.3.2
Genshi: 	0.5.1
mod_python: 	3.3.1
Pygments: 	1.1.1
jQuery:	1.3.2

Attachments (0)

Change History (4)

comment:1 Changed 12 years ago by Daniel Kahn Gillmor

Hi, i'm the maintainer of the SensitiveTicketsPlugin. I'm not sure it makes sense to install both SensitiveTicketsPlugin and PrivateTicketsPlugin to the same trac instance. Can you explain what your desired behavor is?

SensitiveTicketsPlugin makes it so that some tickets get marked as visible only to a select group. PrivateTicketsPlugin makes it so that *all* tickets get marked as visible only to a select group. Why would you want both?

comment:2 Changed 12 years ago by hju

Sorry for the delayed response. Was shure I answered your request.

Here is my explenation.

The PrivateTicketsPlugin is used in our environment to grant access for special user to tickets concerning them (own tickets, tickets reported or tickets in cc). These are users which are assigned to special projects or should not be bothered with all off the tickets

The SensitivTicketsPlugin is relevant for user which normaly have access to all tickets (user in backoffice), but should not see special tickets with "critical" informations. So we can mark individual tickets to be not visible to them.

Hope this makes clear why we want to use both Plugins.

Version 0, edited 12 years ago by hju (next)

comment:3 Changed 4 years ago by Ryan J Ollos

Owner: Daniel Kahn Gillmor deleted

comment:4 Changed 4 years ago by Ryan J Ollos

Cc: Ryan J Ollos removed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.

Add Comment


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

 
Note: See TracTickets for help on using tickets.