Changes in 2.19

Christian Robottom Reis kiko at async.com.br
Mon Aug 2 13:54:31 UTC 2004


On Fri, Jul 30, 2004 at 10:43:11PM -0400, David Miller wrote:
> 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.  

Some post-checkin issues that might be worth discussing:

    - Does it make sense to offer a logged_in method that returns zero
      or one based on the id being zero or not? The id==0 thing is an
      implementation detail that would really be better hidden and reads
      a lot worse.

    - Are there certain Bug attributes for which we want to raise an
      error if someone tries to get/change it on a logged out user? This
      might be a good way of catching possible illegal access to an
      attribute or two.

Joel, Erik, Dave?

Take care,
--
Christian Robottom Reis | http://async.com.br/~kiko/ | [+55 16] 3361 2331



More information about the developers mailing list