forked from lix-project/hydra
* Regenerate the bindings from a clean sqlite database.
This commit is contained in:
parent
ff9987c904
commit
5613448a81
|
@ -310,7 +310,7 @@ sub releases :Local {
|
|||
return requireLogin($c) if !$c->user_exists;
|
||||
|
||||
return error($c, "Only the project owner or the administrator can perform this operation.")
|
||||
unless $c->check_user_roles('admin') || $c->user->username eq $project->owner;
|
||||
unless $c->check_user_roles('admin') || $c->user->username eq $project->owner->username;
|
||||
|
||||
if ($subcommand eq "edit") {
|
||||
$c->stash->{template} = 'edit-releaseset.tt';
|
||||
|
@ -359,7 +359,7 @@ sub create_releaseset :Local {
|
|||
return requireLogin($c) if !$c->user_exists;
|
||||
|
||||
return error($c, "Only the project owner or the administrator can perform this operation.")
|
||||
unless $c->check_user_roles('admin') || $c->user->username eq $project->owner;
|
||||
unless $c->check_user_roles('admin') || $c->user->username eq $project->owner->username;
|
||||
|
||||
if (defined $subcommand && $subcommand eq "submit") {
|
||||
eval {
|
||||
|
@ -552,7 +552,7 @@ sub project :Local {
|
|||
return requireLogin($c) if !$c->user_exists;
|
||||
|
||||
return error($c, "Only the project owner or the administrator can perform this operation.")
|
||||
unless $c->check_user_roles('admin') || $c->user->username eq $project->owner;
|
||||
unless $c->check_user_roles('admin') || $c->user->username eq $project->owner->username;
|
||||
|
||||
if ($subcommand eq "edit") {
|
||||
$c->stash->{edit} = 1;
|
||||
|
@ -594,12 +594,13 @@ sub createproject :Local {
|
|||
|
||||
if (defined $subcommand && $subcommand eq "submit") {
|
||||
eval {
|
||||
my $projectName = $c->request->params->{name};
|
||||
my $projectName = trim $c->request->params->{name};
|
||||
$c->model('DB')->schema->txn_do(sub {
|
||||
# Note: $projectName is validated in updateProject,
|
||||
# which will abort the transaction if the name isn't
|
||||
# valid.
|
||||
my $project = $c->model('DB::Projects')->create({name => $projectName, displayname => ""});
|
||||
# valid. Idem for the owner.
|
||||
my $project = $c->model('DB::Projects')->create(
|
||||
{name => $projectName, displayname => "", owner => trim $c->request->params->{owner}});
|
||||
updateProject($c, $project);
|
||||
});
|
||||
return $c->res->redirect($c->uri_for("/project", $projectName));
|
||||
|
|
|
@ -8,8 +8,8 @@ use base 'DBIx::Class::Schema';
|
|||
__PACKAGE__->load_classes;
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-27 14:48:09
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:jJnmW70e1RDsSt5ClahomQ
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-28 18:56:45
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:RmC02q4hhhk/Vs/2O97L5w
|
||||
|
||||
|
||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
||||
|
|
|
@ -36,8 +36,8 @@ __PACKAGE__->belongs_to("build", "Hydra::Schema::Builds", { id => "build" });
|
|||
__PACKAGE__->belongs_to("dependency", "Hydra::Schema::Builds", { id => "dependency" });
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-27 14:48:09
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:R1F2JbVygktvK55xmY8mcg
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-28 18:56:45
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ysEtYtg8L5z3W6dyFzXy9A
|
||||
|
||||
|
||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
||||
|
|
|
@ -33,8 +33,8 @@ __PACKAGE__->set_primary_key("build", "productnr");
|
|||
__PACKAGE__->belongs_to("build", "Hydra::Schema::Builds", { id => "build" });
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-27 14:48:09
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:aZuZd+oUAO1c8GvSbgn7Fw
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-28 18:56:45
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:/OlaD8I5rojLRBbAL+C/qw
|
||||
|
||||
|
||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
||||
|
|
|
@ -24,13 +24,15 @@ __PACKAGE__->add_columns(
|
|||
{ data_type => "text", is_nullable => 0, size => undef },
|
||||
"releasename",
|
||||
{ data_type => "text", is_nullable => 0, size => undef },
|
||||
"keep",
|
||||
{ data_type => "integer", is_nullable => 0, size => undef },
|
||||
);
|
||||
__PACKAGE__->set_primary_key("id");
|
||||
__PACKAGE__->belongs_to("id", "Hydra::Schema::Builds", { id => "id" });
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-27 14:48:09
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:QahlwGdZKC7mL7fvwNxWjA
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-28 18:56:45
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:cl2tJxeh476i1qzp28BB4g
|
||||
|
||||
|
||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
||||
|
|
|
@ -70,8 +70,8 @@ __PACKAGE__->has_many(
|
|||
);
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-27 14:48:09
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:uRSa4YkaRG0K6vK/qhGI9w
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-28 18:56:45
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:UX6GChi62wrJdc3eYRtCyQ
|
||||
|
||||
__PACKAGE__->has_many(dependents => 'Hydra::Schema::Buildinputs', 'dependency');
|
||||
|
||||
|
|
|
@ -18,6 +18,8 @@ __PACKAGE__->add_columns(
|
|||
{ data_type => "text", is_nullable => 0, size => undef },
|
||||
"logfile",
|
||||
{ data_type => "text", is_nullable => 0, size => undef },
|
||||
"disabled",
|
||||
{ data_type => "integer", is_nullable => 0, size => undef },
|
||||
"starttime",
|
||||
{ data_type => "integer", is_nullable => 0, size => undef },
|
||||
);
|
||||
|
@ -25,8 +27,8 @@ __PACKAGE__->set_primary_key("id");
|
|||
__PACKAGE__->belongs_to("id", "Hydra::Schema::Builds", { id => "id" });
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-27 14:48:09
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:xBocoeipFdRsWDhvtoXImA
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-28 18:56:45
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:M45MbodAbVDwSiQDsw3erA
|
||||
|
||||
|
||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
||||
|
|
|
@ -35,8 +35,8 @@ __PACKAGE__->set_primary_key("id", "stepnr");
|
|||
__PACKAGE__->belongs_to("id", "Hydra::Schema::Builds", { id => "id" });
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-27 14:48:09
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:04BankpQ6xo6T/ioMTdWkQ
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-28 18:56:45
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ZAv//9TF7lfoaKCDdCLFNw
|
||||
|
||||
|
||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
||||
|
|
|
@ -22,8 +22,8 @@ __PACKAGE__->add_columns(
|
|||
__PACKAGE__->set_primary_key("srcpath", "sha256hash");
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-27 14:48:09
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Nq3TpcRmpSRWNL4Q1hGGrA
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-28 18:56:45
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:FJxFwR19zFl2zEcAchDCLg
|
||||
|
||||
|
||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
||||
|
|
|
@ -20,8 +20,8 @@ __PACKAGE__->add_columns(
|
|||
__PACKAGE__->set_primary_key("uri", "revision");
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-27 14:48:09
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:CCbHomM+8BTBqHBeGOGcuA
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-28 18:56:45
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:dOpp84bWlqOwiHPe8bsZhQ
|
||||
|
||||
|
||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
||||
|
|
|
@ -22,8 +22,6 @@ __PACKAGE__->add_columns(
|
|||
{ data_type => "integer", is_nullable => 0, size => undef },
|
||||
"tag",
|
||||
{ data_type => "text", is_nullable => 0, size => undef },
|
||||
"boolean",
|
||||
{ data_type => "integer", is_nullable => 0, size => undef },
|
||||
);
|
||||
__PACKAGE__->set_primary_key("project", "jobset", "input", "altnr");
|
||||
__PACKAGE__->belongs_to(
|
||||
|
@ -33,8 +31,8 @@ __PACKAGE__->belongs_to(
|
|||
);
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-27 14:48:09
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:JPf4ozBKK6NQPJT2few40g
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-28 18:56:45
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:SXp0Jc4rBeGfm2RajVLJmw
|
||||
|
||||
|
||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
||||
|
|
|
@ -43,8 +43,8 @@ __PACKAGE__->has_many(
|
|||
);
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-27 14:48:09
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:S8z1W0kjUX9VN5HPjyGAzA
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-28 18:56:45
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:miVk9N1PJ3HxZVBlMVgxFA
|
||||
|
||||
|
||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
||||
|
|
|
@ -50,8 +50,8 @@ __PACKAGE__->has_many(
|
|||
);
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-27 14:48:09
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ebblUCTW7I1wGhVlPfNd3Q
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-28 18:56:45
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:QTfecLOgMWmoaFLt5Yh2Uw
|
||||
|
||||
|
||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
||||
|
|
|
@ -25,6 +25,7 @@ __PACKAGE__->has_many(
|
|||
"Hydra::Schema::Builds",
|
||||
{ "foreign.project" => "self.name" },
|
||||
);
|
||||
__PACKAGE__->belongs_to("owner", "Hydra::Schema::Users", { username => "owner" });
|
||||
__PACKAGE__->has_many(
|
||||
"jobsets",
|
||||
"Hydra::Schema::Jobsets",
|
||||
|
@ -42,8 +43,8 @@ __PACKAGE__->has_many(
|
|||
);
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-27 14:48:09
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:70/Br6966ZZ+p8n6lF1hcw
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-28 18:56:45
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:I8vNdExrfd/eGfHeZRQ21A
|
||||
|
||||
|
||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
||||
|
|
|
@ -32,8 +32,8 @@ __PACKAGE__->belongs_to(
|
|||
);
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-27 14:48:09
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:t2ZI1kBn/GsKlY0e4+Wspg
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-28 18:56:45
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:m3ADAo2XKQ1Mu5JdNa3FFw
|
||||
|
||||
|
||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
||||
|
|
|
@ -29,8 +29,8 @@ __PACKAGE__->has_many(
|
|||
);
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-27 14:48:09
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:pNqwNlXuENM/SsZ/utKhWw
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-28 18:56:45
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:2SXTc8MC9KG9VM0uRHUwig
|
||||
|
||||
|
||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
||||
|
|
|
@ -16,8 +16,8 @@ __PACKAGE__->add_columns(
|
|||
__PACKAGE__->set_primary_key("system");
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-27 14:48:09
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:WeoKp84cptljEdtD+5l7Ug
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-28 18:56:45
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:AyTEOJr+JjRxJpI1ITG1Tw
|
||||
|
||||
|
||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
||||
|
|
|
@ -17,8 +17,8 @@ __PACKAGE__->set_primary_key("username", "role");
|
|||
__PACKAGE__->belongs_to("username", "Hydra::Schema::Users", { username => "username" });
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-27 14:48:09
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:WxjgPLWPvXpQ3nmxmlU7Dw
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-28 18:56:45
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:5dAhmCyy7/B75rfHAhvNLw
|
||||
|
||||
|
||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
||||
|
|
|
@ -18,6 +18,11 @@ __PACKAGE__->add_columns(
|
|||
{ data_type => "text", is_nullable => 0, size => undef },
|
||||
);
|
||||
__PACKAGE__->set_primary_key("username");
|
||||
__PACKAGE__->has_many(
|
||||
"projects",
|
||||
"Hydra::Schema::Projects",
|
||||
{ "foreign.owner" => "self.username" },
|
||||
);
|
||||
__PACKAGE__->has_many(
|
||||
"userroles",
|
||||
"Hydra::Schema::Userroles",
|
||||
|
@ -25,8 +30,8 @@ __PACKAGE__->has_many(
|
|||
);
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-27 14:48:09
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:s+M14nuDVIMoRSgXodj3dw
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-28 18:56:45
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:xAAXMAwZYAD5ICFz1dEpKQ
|
||||
|
||||
|
||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
||||
|
|
|
@ -169,7 +169,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<th>Owner:</th>
|
||||
<td><tt>[% INCLUDE maybeEditString param="owner" value=curProject.owner edit=(edit && c.check_user_roles('admin')) %]</tt></td>
|
||||
<td><tt>[% INCLUDE maybeEditString param="owner" value=curProject.owner.username edit=(edit && c.check_user_roles('admin')) %]</tt></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Enabled:</th>
|
||||
|
|
Loading…
Reference in a new issue