Re: error: Role "'provisional user'" does not exist
Dan Tenenbaum <[email protected]>
| Newsgroups | gmane.comp.bug-tracking.roundup.user |
|---|---|
| Message-ID | <[email protected]> |
Sorry for all the replying to myself, but it does seem this is a genuine bug.
I "fixed" it as follows, but this is not a real fix, I'd appreciate it if anyone has a better idea what is going on and how to fix it.
Thanks in advance!
$ hg diff
diff -r 7cf4e1653168 roundup/backends/rdbms_common.py
--- a/roundup/backends/rdbms_common.py Tue Jun 17 11:44:06 2014 -0700
+++ b/roundup/backends/rdbms_common.py Fri Oct 17 13:09:04 2014 -0700
@@ -1508,6 +1508,8 @@
If an id in a link or multilink property does not refer to a valid
node, an IndexError is raised.
"""
+ if "roles" in propvalues and propvalues['roles'] == "'Provisional User'":
+ propvalues['roles'] = "Provisional User"
self.fireAuditors('create', None, propvalues)
newid = self.create_inner(**propvalues)
self.fireReactors('create', newid, None)
Dan
----- Original Message -----
> From: "Dan Tenenbaum" <[email protected]>
> To: [email protected]
> Sent: Friday, October 17, 2014 12:06:22 PM
> Subject: Re: [Roundup-users] error: Role "'provisional user'" does not exist
>
> I found the problem, but not (yet) a solution.
>
> The problem is that after adding this code, new users are added to
> the database (_user table) with their _role column set to:
>
> 'Provisional User'
>
> _including_ the quotes! So of course that does not match what it
> should be (Provisional User without quotes). Hence the error
> message:
>
> Role "'provisional user'" does not exist
>
> Note the extra quotes in that error message.
>
> The problem is, I can't find where the quotes are occurring.
>
> I tried changing security.py and adding the following replace() calls
> to the first line in the Role constructor:
>
> self.name = name.lower().replace("'", "").replace('"', "")
>
> It didn't help....
>
> Any ideas?
>
> Thanks!
> Dan
>
>
>
>
> ----- Original Message -----
> > From: "Dan Tenenbaum" <[email protected]>
> > To: [email protected]
> > Sent: Friday, October 17, 2014 11:11:28 AM
> > Subject: Re: [Roundup-users] error: Role "'provisional user'" does
> > not exist
> >
> > I should note that if I remove userauditor.py, I can register, but
> > then I do not have a link to create my own issue.
> > Dan
> >
> >
> > ----- Original Message -----
> > > From: "Dan Tenenbaum" <[email protected]>
> > > To: [email protected]
> > > Sent: Friday, October 17, 2014 11:03:53 AM
> > > Subject: [Roundup-users] error: Role "'provisional user'" does
> > > not
> > > exist
> > >
> > > Hi,
> > >
> > > I created a "Provisional User" role as described here:
> > >
> > > http://roundup.sourceforge.net/docs/customizing.html#users-may-only-edit-their-issues
> > >
> > > But when I register as a new user and click the link I get in my
> > > email, I see the error
> > >
> > > Role "'provisional user'" does not exist
> > >
> > > This seems to be coming from detectors/userauditor.py.
> > >
> > > I have defined the role in schema.py tbough. One thing I notice
> > > is
> > > that the error message spells "provisional user" in lowercase,
> > > but
> > > the role is defined in schema.py as "Provisional User" (initial
> > > caps). Could it be getting changed to lowercase somewhere and the
> > > auditor does not realize that it is the same?
> > >
> > > Hope someone can help,
> > > Thanks,
> > > Dan
> > >
> > > ------------------------------------------------------------------------------
> > > Comprehensive Server Monitoring with Site24x7.
> > > Monitor 10 servers for $9/Month.
> > > Get alerted through email, SMS, voice calls or mobile push
> > > notifications.
> > > Take corrective actions from your mobile device.
> > > http://p.sf.net/sfu/Zoho
> > > _______________________________________________
> > > Roundup-users mailing list
> > > [email protected]
> > > https://lists.sourceforge.net/lists/listinfo/roundup-users
> > >
> >
> > ------------------------------------------------------------------------------
> > Comprehensive Server Monitoring with Site24x7.
> > Monitor 10 servers for $9/Month.
> > Get alerted through email, SMS, voice calls or mobile push
> > notifications.
> > Take corrective actions from your mobile device.
> > http://p.sf.net/sfu/Zoho
> > _______________________________________________
> > Roundup-users mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/roundup-users
> >
>
> ------------------------------------------------------------------------------
> Comprehensive Server Monitoring with Site24x7.
> Monitor 10 servers for $9/Month.
> Get alerted through email, SMS, voice calls or mobile push
> notifications.
> Take corrective actions from your mobile device.
> http://p.sf.net/sfu/Zoho
> _______________________________________________
> Roundup-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/roundup-users
>
------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho