| 1 | package Crop::Rights::Privilege; | ||
| 2 | use base qw/ Crop::Object /; | ||
| 3 | |||
| 4 | =begin nd | ||
| 5 | Class: Crop::Rights::Perm | ||
| 6 | Permissions of Realm. | ||
| 7 | =cut | ||
| 8 | |||
| 9 | use v5.14; | ||
| 10 | use warnings; | ||
| 11 | |||
| 12 | =begin nd | ||
| 13 | Variable: our %Attributes | ||
| 14 | Class attributes: | ||
| 15 | |||
| 16 | description - description | ||
| 17 | id_perm - permission | ||
| 18 | id_realm - realm | ||
| 19 | name - name | ||
| 20 | perm - extra object <Crop::Rights::Perm> for attribute 'id_perm' | ||
| 21 | realm - extra object <Crop::Rights::Realm> for attribute 'id_realm' | ||
| 22 | =cut | ||
| 23 | our %Attributes = ( | ||
| 24 | description => undef, | ||
| 25 | id_perm => {key => 'extern'}, | ||
| 26 | id_realm => {key => 'extern'}, | ||
| 27 | name => undef, | ||
| 28 | perm => {mode => 'read', type => 'cache'}, | ||
| 29 | realm => {mode => 'read', type => 'cache'}, | ||
| 30 | |||
| 31 | EXT => { | ||
| 32 | perm => { | ||
| 33 | type => 'refbook', | ||
| 34 | class => 'Crop::Rights::Perm', | ||
| 35 | xattr => {id_perm => 'id'}, | ||
| 36 | view => 'perm', | ||
| 37 | }, | ||
| 38 | realm => { | ||
| 39 | type => 'refbook', | ||
| 40 | class => 'Crop::Rights::Realm', | ||
| 41 | xattr => {id_realm => 'id'}, | ||
| 42 | view => 'realm', | ||
| 43 | }, | ||
| 44 | |||
| 45 | } | ||
| 46 | ); | ||
| 47 | |||
| 48 | =begin nd | ||
| 49 | Method: Table ( ) | ||
| 50 | Table in Warehouse. | ||
| 51 | |||
| 52 | Returns: | ||
| 53 | 'privilege' string | ||
| 54 | =cut | ||
| 55 | sub Table { 'privilege' } | ||
| 56 | |||
| 57 | 1; |