Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Checkpoint

  • Loading branch information...
commit 2e376c5ca76edf1c79dfcf4b9e6f4f4afaece67f 1 parent 818fa75
@jhannah authored
View
12 lib/KiokuX/Model/UserAccounts.pm
@@ -17,6 +17,18 @@ KiokuX::Model::UserAccounts - Decoupled security roles for L<KiokuDB>
L<http://blog.woobling.org/2009/06/users-accounts-identities-and-roles.html>
+=head1 METHODS
+
+=head2 get_identity
+
+=cut
+
+sub get_identity {
+ my $self = shift;
+ my ($user_id) = @_;
+ return $self->lookup("identity:$user_id");
+}
+
=head1 VERSION CONTROL
L<http://github.com/jhannah/kiokux-model-useraccounts/>
View
2  lib/KiokuX/Model/UserAccounts/Account.pm
@@ -1,8 +1,6 @@
package KiokuX::Model::UserAccounts::Account;
use Moose::Role;
-__PACKAGE__->meta->make_immutable;
-no Moose;
1;
View
16 lib/KiokuX/Model/UserAccounts/Identity.pm
@@ -1,8 +1,20 @@
package KiokuX::Model::UserAccounts::Identity;
use Moose::Role;
-__PACKAGE__->meta->make_immutable;
-no Moose;
+with qw(
+ KiokuX::User
+ KiokuDB::Role::ID
+);
+
+has user => (
+ is => 'rw',
+ isa => 'Narwhal::User',
+);
+
+has name => (
+ is => 'rw',
+ isa => 'Str',
+);
1;
View
2  lib/KiokuX/Model/UserAccounts/Role.pm
@@ -1,8 +1,6 @@
package KiokuX::Model::UserAccounts::Role;
use Moose::Role;
-__PACKAGE__->meta->make_immutable;
-no Moose;
1;
View
14 lib/KiokuX/Model/UserAccounts/User.pm
@@ -1,9 +1,17 @@
package KiokuX::Model::UserAccounts::User;
use Moose::Role;
-__PACKAGE__->meta->make_immutable;
-no Moose;
+with qw(
+ KiokuX::User
+ KiokuDB::Role::ID
+);
-1;
+
+has jay => (
+ is => 'rw',
+ isa => 'Str',
+ default => 'FOOBITY!'
+);
+1;
Please sign in to comment.
Something went wrong with that request. Please try again.