Changes in 2.19

David Miller justdave at bugzilla.org
Sat Jul 31 02:43:11 UTC 2004


Joel Peshkin wrote:

>     When developing new code for the 2.19 branch, please be aware that 
> Bugzilla->user will ALWAYS be defined even if no user is logged in.(bug 
> 253588)  Bugzilla->user->id will be non-zero only if a user is logged 
> in.  Functions controlling user access permissions can now move from 
> globals.pl to User.pm have one extremely fast implementation.
> 
>    Similarly, templates checking for login should use {% IF user.id %] 
> instead of [% IF user %]

The rest of this story is:  There is now an "anonymous" user, which has 
no permissions and no login_name and a userid of 0, which is the default 
User object that you get when you reference Bugzilla->user and the user 
is not logged in.  This allows a whole mess of functions to now work the 
same way whether someone is logged in or not, and still produce fast 
results, instead of having to have forks in the code for whether there's 
a logged in user or not all over the place.

It also makes it really easy to remove a whole mess of stuff from 
globals.pl (which we've been trying to get rid of for ages for mod_perl 
reasons :) )

-- 
Dave Miller      Project Leader, Bugzilla Bug Tracking System
http://www.justdave.net/             http://www.bugzilla.org/



More information about the developers mailing list