Actually - since that check_can_admin product is really something which raises questions (does it pose additional restrictions or is just a sanity check; and why should we call it upfront when create() will call it anyway if it does so). We may replace it (talking about the code in my patch): my $product = $user->check_can_admin_product( $product_name );
with that: my $product = Bugzilla::Product::check_product( $product_name ); What Bugzilla web UI does is to call to check_can_admin_product before performing version create. Regards, Yavor On Thu, Jun 24, 2010 at 20:32, Yavor Nikolov <[email protected]>wrote: > Hi, > > I should admit I'm not quite sure whether check_can_admin_product is called > on create or not (I just suspect it's called). There is some stuff in > Bugzilla which is not very obvious - like validators called on object > creation, etc and _check_product looks like one of these validators > (_check_product calls check_can_admin_product). I think it would be best to > consult someone from Bugzilla side. > > Some testing won't hurt either. > > Best regards, > Yavor > > > On Thu, Jun 24, 2010 at 20:16, Kristis Makris <[email protected]> wrote: > >> >> > > relevant permissions). So I suspect calling >> > > $user->check_can_admin_product doesn't pose any additional >> > > restrictions (just performs a check which Version->create >> > will perform >> > > anyway when called). >> >> This statement is misleading. Version->create() does NOT call >> check_can_admin_product. This means that adding this call will indeed >> prohibit users from creating private tags. >> > >
_______________________________________________ scmbug-users mailing list [email protected] http://lists.mkgnu.net/cgi-bin/mailman/listinfo/scmbug-users
