has 'password' => (is => 'rw', required => 1);
## Change this default active value if you want/need to have an admin confirm a user after they self-create.
has 'active' => (is => 'rw', default => sub { 1; });
+has 'role' => (is => 'rw', default => sub { 'user' });
# 'traits' => ['Array'] ?
# https://metacpan.org/module/Moose::Meta::Attribute::Native::Trait::Array
has 'traditions' => (is => 'rw',
$self->traditions(\@traditions);
}
+sub is_admin {
+ my ($self) = @_;
+
+ return $self->role eq 'admin';
+}
+
1;
=head1 NAME