Show traditions based on the current logged-in user
[scpubgit/stemmatology.git] / stemmaweb / lib / stemmaweb / Model / User.pm
CommitLineData
d1ba091f 1package stemmaweb::Model::User;
2use strict;
3use warnings;
4use Moose;
5use Text::Tradition::UserStore;
6
7extends 'Catalyst::Model::KiokuDB';
8
9has '+model_class' => ( default => 'Text::Tradition::UserStore' );
10
4dbd098b 111;
12
d7816ff4 13=head1 NAME
14
15stemmaweb::Model::User - User/Auth KiokuDB model for stemmaweb
16
17=head1 SYNOPSIS
18
19 ## CONFIGURATION, in .conf file (this is the default setting)
20 <Model::User>
21 model_class Text::Tradition::UserStore
22 </Model::User>
23
24 <Plugin::Authentication>
25 <default>
26 <credential>
27 class 'Password'
28 password_field 'password'
29 password_type 'self_check'
30 </credential>
31 <store>
32 class 'Model::KiokuDB'
33 model_name 'User'
34 </store>
35 </default>
36 </Plugin::Authentication>
37
38
39=head1 DESCRIPTION
40
41This is the User Model used as a Authentication Store (using
42::Store::Model::KiokuDB) for stemmaweb user authentication.
43
44This separate model allows us to have self-contained user storage,
45which is replaceable. The default uses Text::Tradition::UserStore and
46stores the Users alongside the Traditions.
47
48To replace the source of users for authentication, add the
49configuration shown in the L</SYNOPSIS> to your stemmaweb.conf file,
50and adjust as necessary.