Anyone got any insights or had the plugin working in 0.12?

On Jun 18, 3:12 pm, Ben <benit...@gmail.com> wrote:
> I logged in as a user with TRAC_ADMIN permissions ('bob'), went to
> create a new ticket and got the following in my trac.log:
>
> 2010-06-18 15:07:01,042 Trac[web_ui] DEBUG: SimpleTicket: Filtering
> new ticket form for bob
>
> I see that the plugin code looks like this:
>
> allow_override = self.allow_override or
> req.perm.has_permission('TRAC_ADMIN')
> if allow_override:
>   do_filter = req.session.get('simpleticket.do_filter', do_filter)
>
> if do_filter:
>   hide_fields = set(self.hide_fields)
>   self.log.debug('SimpleTicket: Filtering new ticket form for %s',
> req.authname)
>   data['fields'] = [f for f in data['fields'] if f['name'] not in
> hide_fields]
>
> So this means that 'req.session.get('simpleticket.do_filter',
> do_filter)' needs to be returning false for the override to work.  Do
> I need to manually reset some session data (clearing my browser cache
> didn't have any effect).
>
> Cheers
> Ben
>
> On Jun 18, 3:02 pm, Ben <benit...@gmail.com> wrote:
>
>
>
> > Hi,
>
> > I see that in the code for the plugin (web_ui.py) and it looks like it
> > should work.  Unless I'm missing your point, it looks like the plugin
> > code is fine?
>
> > But it doesn't seem to work - the field is hidden regardless of the
> > permission setup (i.e. TRAC_ADMIN or not).  Is there something subtle
> > going on because I'm using Trac 0.12 with an egg distribution
> > generated from the plugin source version 0.11?
>
> > Ben
>
> > On Jun 18, 2:33 pm, Erik Andersson <kir...@gmail.com> wrote:
>
> > > Hi
>
> > > allow_override = self.allow_override or 
> > > req.perm.has_permission('TRAC_ADMIN'
> > > )
>
> > > Cheers / Erik
>
> > > On Fri, Jun 18, 2010 at 3:16 PM, Ben <benit...@gmail.com> wrote:
> > > > I've tried setting it to true or false and there is no discernible
> > > > change in behaviour.  Specifically, I have a user with TRAC_ADMIN
> > > > permissions who always see the simple ticket fields instead of the
> > > > standard ones, which is annoying!
>
> > > > I bet I'm doing something wrong.
>
> > > > My trac.ini contains:
>
> > > > [simpleticket]
> > > > hide = priority
> > > > allow_override = true
>
> > > > Any ideas?
>
> > > > Ben
>
> > > > --
> > > > You received this message because you are subscribed to the Google 
> > > > Groups
> > > > "Trac Users" group.
> > > > To post to this group, send email to trac-us...@googlegroups.com.
> > > > To unsubscribe from this group, send email to
> > > > trac-users+unsubscr...@googlegroups.com<trac-users%2bunsubscr...@googlegrou
> > > >  ps.com>
> > > > .
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/trac-users?hl=en.

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To post to this group, send email to trac-us...@googlegroups.com.
To unsubscribe from this group, send email to 
trac-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/trac-users?hl=en.

Reply via email to