Replace other group references with Testers group

This commit is contained in:
ghendricks%novell.com 2007-02-14 00:40:36 +00:00
Родитель 911502366b
Коммит 89c8d74fa2
8 изменённых файлов: 16 добавлений и 12 удалений

Просмотреть файл

@ -300,7 +300,10 @@ sub UpdateDB {
$dbh->bz_add_column('test_plan_tags', 'userid', {TYPE => 'INT3', NOTNULL => 1}, 0);
$dbh->bz_add_column('test_runs', 'default_tester_id', {TYPE => 'INT3'});
$dbh->bz_add_column('test_run_tags', 'userid', {TYPE => 'INT3', NOTNULL => 1}, 0);
$dbh->bz_add_column('test_builds', 'isactive', {TYPE => 'BOOLEAN', NOTNULL => 1, DEFAULT => '1'}, 1);
$dbh->bz_add_column('test_cases', 'estimated_time', {TYPE => 'TIME'}, 0);
$dbh->bz_add_column('test_case_runs', 'running_date', {TYPE => 'DATETIME'}, 0);
$dbh->bz_alter_column('test_attachment_data', 'attachment_id', {TYPE => 'INT4', UNSIGNED => 1, NOTNULL => 1});
$dbh->bz_alter_column('test_attachments', 'attachment_id', {TYPE => 'INTSERIAL', PRIMARYKEY => 1, NOTNULL => 1});
$dbh->bz_alter_column('test_attachments', 'case_id', {TYPE => 'INT4', UNSIGNED => 1});

Просмотреть файл

@ -285,7 +285,7 @@ my $case = Bugzilla::Testopia::TestCase->new({'case_id' => 0});
$vars->{'filtered'} = 1 if $cgi->cookie('TESTOPIA-FILTER-RUN-' . $vars->{'run'}->id) && $cgi->param('action') ne 'clear_filter';
$vars->{'expand_report'} = $cgi->param('expand_report') || 0;
$vars->{'expand_filter'} = $cgi->param('expand_filter') || 0;
$vars->{'dotweak'} = UserInGroup('edittestcases');
$vars->{'dotweak'} = UserInGroup('Testers');
$vars->{'table'} = $table;
$vars->{'action'} = 'tr_list_caserun.cgi';
$vars->{'caserun'} = Bugzilla::Testopia::TestCaseRun->new({});

Просмотреть файл

@ -380,7 +380,7 @@ $vars->{'fullwidth'} = 1; #novellonly
$vars->{'case'} = $c;
$vars->{'status_list'} = $status_list;
$vars->{'priority_list'} = $priority_list;
$vars->{'dotweak'} = UserInGroup('edittestcases');
$vars->{'dotweak'} = UserInGroup('Testers');
$vars->{'table'} = $table;
$vars->{'urlquerypart'} = $cgi->canonicalise_query('cmdtype');

Просмотреть файл

@ -154,7 +154,7 @@ else {
$vars->{'type_list'} = $type_list;
$vars->{'fullwidth'} = 1; #novellonly
$vars->{'dotweak'} = UserInGroup('managetestplans');
$vars->{'dotweak'} = UserInGroup('Testers');
$vars->{'table'} = $table;
if ($serverpush && !$cgi->param('debug')) {
print $cgi->multipart_end;

Просмотреть файл

@ -178,7 +178,7 @@ else {
$vars->{'status_list'} = $status_list;
$vars->{'fullwidth'} = 1; #novellonly
$vars->{'dotweak'} = UserInGroup('runtests');
$vars->{'dotweak'} = UserInGroup('Testers');
$vars->{'table'} = $table;
if ($serverpush && !$cgi->param('debug')) {
print $cgi->multipart_end;

Просмотреть файл

@ -37,7 +37,6 @@ use vars qw($template $vars);
my $template = Bugzilla->template;
Bugzilla->login(LOGIN_REQUIRED);
ThrowUserError("testopia-create-denied", {'object' => 'Test Case'}) unless UserInGroup('edittestcases');
print Bugzilla->cgi->header();
@ -70,6 +69,7 @@ foreach my $entry (@plan_id){
}
foreach my $id (keys %seen){
my $plan = Bugzilla::Testopia::TestPlan->new($id);
ThrowUserError("testopia-create-denied", {'object' => 'Test Case'}) unless $plan->canedit;
push @plan_ids, $id;
push @plans, $plan;
push @categories, @{$plan->product->categories};

Просмотреть файл

@ -38,7 +38,7 @@ use vars qw($template $vars);
my $template = Bugzilla->template;
Bugzilla->login(LOGIN_REQUIRED);
ThrowUserError("testopia-create-denied", {'object' => 'Test Plan'}) unless UserInGroup('managetestplans');
ThrowUserError("testopia-create-denied", {'object' => 'Test Plan'}) unless UserInGroup('Testers');
print Bugzilla->cgi->header();

Просмотреть файл

@ -42,11 +42,6 @@ Bugzilla->login(LOGIN_REQUIRED);
my $dbh = Bugzilla->dbh;
my $cgi = Bugzilla->cgi;
unless (UserInGroup('edittestcases')){
print $cgi->header;
ThrowUserError("testopia-create-denied", {'object' => 'Test Run'});
}
push @{$::vars->{'style_urls'}}, 'testopia/css/default.css';
my $action = $cgi->param('action') || '';
@ -63,6 +58,12 @@ detaint_natural($plan_id);
validate_test_id($plan_id, 'plan');
my $plan = Bugzilla::Testopia::TestPlan->new($plan_id);
unless ($plan->canedit){
print $cgi->header;
ThrowUserError("testopia-create-denied", {'object' => 'Test Run'});
}
unless (scalar @{$plan->product->builds} >0){
print $cgi->header;
ThrowUserError('testopia-create-build', {'plan' => $plan});