Hi Kristis, My patch for that on top of scmbug 0.26.17 worked fine in general but I can see you've modified it when merging to scmbug in order to allow private branching.
I took the code for my patch from Bugzilla's cgi scripts and version create is anyway executed by the name of the given user (with the 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). Regards, Yavor On Wed, Jun 23, 2010 at 10:04, Michal Kašpar <[email protected]> wrote: > Current code in integration_add_tag for BZ 3.6 is still not correct. If > I try to make a new BZ branch via Subversion, I get error in log: > 2010/06/23 08:45:37 Scmbug ERROR> > Version.pm:193:Bugzilla::Version::_check_product - Can't locate object > method "name" via package "TestProduct" (perhaps you forgot to load > "TestProduct"?) at /srv/www/htdocs/bugzilla/Bugzilla/Version.pm line 193. > This patch fixes it: > --- Bugzilla.pm.orig 2010-06-23 08:50:51.000000000 +0200 > +++ Bugzilla.pm 2010-06-23 08:54:32.000000000 +0200 > @@ -1295,6 +1295,12 @@ > SendSQL( $sql ); > PopGlobalSQLState(); > } else { > + my $product = new Bugzilla::Product( { name => $product_name } ); > + > + if( !defined ( $product ) ) { > + # The product name does not exist > + return 1; > + } > > my $user = ""; > # Need to first check if the user exists > @@ -1314,7 +1320,7 @@ > } else { > # User->check did not raise an exception. The user exists. > Bugzilla->set_user( $user ); > - my $version = Bugzilla::Version->create( { name => $tag_name, > product => $product_name } ); > + my $version = Bugzilla::Version->create( { name => $tag_name, > product => $product } ); > } > } > > > -- > Michal Kašpar > > > _______________________________________________ > scmbug-users mailing list > [email protected] > http://lists.mkgnu.net/cgi-bin/mailman/listinfo/scmbug-users >
_______________________________________________ scmbug-users mailing list [email protected] http://lists.mkgnu.net/cgi-bin/mailman/listinfo/scmbug-users
