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IUCOFNY44ZCQXG5SNAPHYQYQHAC
W6DC6K4INJQOJYR553ISCKZV7YIOGHEM3FZQPOLAPSZQ3KSJDMRQC
HJLYC7537T37E5AQ4Y4PYDBRLVIZVWYS4R7WPSLGO6SJPS6M6LMAC
N22GPKYTOLZLBGTGDATQDVZ4R5APZEAOIA7L32X4UXBH4XNI7MWAC
<authentication>
default_realm dbic
<realms>
<dbic>
<credential>
class Password
password_field password
password_type hashed
password_hash_type SHA-1
</credential>
<store>
class DBIx::Class
user_class DB::Users
</store>
</dbic>
</realms>
</authentication>
if ($username && $password) {
if ($c->authenticate({username => $username, password => $password})) {
$c->response->redirect(
defined $c->flash->{afterLogin}
? $c->flash->{afterLogin}
: $c->uri_for('/'));
$c->flash->{afterLogin} = undef;
return;
}
$c->stash->{errorMsg} = "Bad username or password.";
}
$c->stash->{template} = 'login.tt';
}
sub logout :Local {
my ($self, $c) = @_;
$c->logout;
$c->response->redirect($c->uri_for('/'));
}
sub requireLogin {
my ($c) = @_;
$c->flash->{afterLogin} = $c->request->uri;
$c->response->redirect($c->uri_for('/login'));
}
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-26 18:03:19
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:LXmRVGbyhgP5UGYK5ekbog
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-26 20:02:52
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:LRcAsbLWbetVw+DCDnv/9w
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-26 18:03:19
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ai10FDZA/INuvAMu+1mvWw
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-26 20:02:52
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Pu6gWxltfVJJ+9DBiC9bYg
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-26 18:03:19
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:KLmCZNoPd+vFmAj7XNtLMQ
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-26 20:02:52
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:X5GXZRLAaCMl8OKBGjtztw
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-26 18:03:19
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:hm/IA7ESnKT9gls0lw1Daw
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-26 20:02:52
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:h32zqOEGcpXQy7pshiWVMA
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-26 18:03:19
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:d/8LOVy+FfKFEo7iFbP3Gw
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-26 20:02:52
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:egegc7kFKTt9cEGuomi0cQ
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-26 18:03:19
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:a/DM38J4HR2LBDTeXvt4uA
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-26 20:02:52
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:kFD90OFRM1aqVVCBCh/geA
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-26 18:03:19
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Pnefs6s7Y0i3YRE+BoWdDg
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-26 20:02:52
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:r/3GaLIIWaX1fh8kfuQp+w
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-26 18:03:19
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:gmw8LSLTRV00vCYDKiuZOw
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-26 20:02:52
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:yTp1XcBSQ+6OJvVLugRh1w
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-26 18:03:19
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:R26KAvuQZHKAyG/hEaB6Gw
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-26 20:02:52
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:lYdNLENxLW2mtZ2w+jou8w
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-26 18:03:19
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:quDswVe6ApUm4cYVVijAEw
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-26 20:02:52
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Bk/vLWpBjR3ZU0p1KN7KfA
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-26 18:03:19
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:nDI28mE5gmZwDozOG/0fnw
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-26 20:02:52
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:9xvvQg/H0oibycB6B45V5A
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-26 18:03:19
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:SKZ/imJK1fjPbBEXde23Og
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-26 20:02:52
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:3YMBhMqCjtpUjoTx4JLTOw
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-26 18:03:19
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:/NVhmxcHU6YWCXDX9sO8mA
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-26 20:02:52
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:SSKVFeg7ieeLJcF+s1uWWw
package Hydra::Schema::Users;
use strict;
use warnings;
use base 'DBIx::Class';
__PACKAGE__->load_components("Core");
__PACKAGE__->table("Users");
__PACKAGE__->add_columns(
"username",
{ data_type => "text", is_nullable => 0, size => undef },
"fullname",
{ data_type => "text", is_nullable => 0, size => undef },
"emailaddress",
{ data_type => "text", is_nullable => 0, size => undef },
"password",
{ data_type => "text", is_nullable => 0, size => undef },
);
__PACKAGE__->set_primary_key("username");
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-26 20:02:52
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:BgF6FK+9d7+cc72sp6pfCQ
# You can replace this text with custom content, and it will be preserved on regeneration
1;
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-26 18:03:19
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Pcp+OvDPqTvMftKcbkPkjA
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-26 20:02:52
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:jK/9VMZBot2RJwtlHA6QIg
[% INCLUDE makeLink uri = c.uri_for('/users') title = "Users" %]
[% INCLUDE makeLink uri = c.uri_for('/createproject') title = "Create a project" %]
[% IF c.user_exists %]
[% INCLUDE makeLink uri = c.uri_for('/logout') title = "Logout" %]
[% ELSE %]
[% INCLUDE makeLink uri = c.uri_for('/login') title = "Login" %]
[% END %]
[% INCLUDE makeLink uri = c.uri_for('/createproject') title = "Create project" %]