Parent Directory | Revision Log
added role model and implement checking of roles
1 | use strict; |
2 | use warnings; |
3 | |
4 | package SQLSession::Model::Role; |
5 | use Jifty::DBI::Schema; |
6 | |
7 | use SQLSession::Model::User; |
8 | |
9 | use SQLSession::Record schema { |
10 | |
11 | column user_id => |
12 | refers_to SQLSession::Model::User by 'id', |
13 | is mandatory, |
14 | is indexed; |
15 | |
16 | column role => |
17 | type is 'text', |
18 | valid are qw/student edit admin/, |
19 | default is 'student', |
20 | is mandatory, |
21 | is indexed; |
22 | |
23 | }; |
24 | |
25 | # Your model-specific methods go here. |
26 | |
27 | sub since { '0.0.5' }; |
28 | |
29 | 1; |
30 |
ViewVC Help | |
Powered by ViewVC 1.1.26 |