File Coverage

blib/lib/Yukki/Settings/Privileges.pm
Criterion Covered Total %
statement 17 17 100.0
branch n/a
condition n/a
subroutine 6 6 100.0
pod n/a
total 23 23 100.0


line stmt bran cond sub pod time code
1             package Yukki::Settings::Privileges;
2             $Yukki::Settings::Privileges::VERSION = '0.991_002'; # TRIAL
3              
4 3     3   1688 $Yukki::Settings::Privileges::VERSION = '0.991002';use v5.24;
  3         14  
5 3     3   26 use utf8;
  3         9  
  3         36  
6 3     3   101 use Moo;
  3         8  
  3         22  
7              
8 3     3   1215 use Types::Standard qw( ArrayRef Str );
  3         9  
  3         30  
9 3     3   2965 use Yukki::Types qw( AccessLevel );
  3         7  
  3         22  
10              
11 3     3   1407 use namespace::clean;
  3         8  
  3         25  
12              
13             # ABSTRACT: settings describing privileges
14              
15              
16             has anonymous_access_level => (
17             is => 'ro',
18             isa => Yukki::Types::AccessLevel,
19             required => 1,
20             default => 'none',
21             );
22              
23              
24             has read_groups => (
25             is => 'ro',
26             isa => Str|ArrayRef[Str],
27             required => 1,
28             default => 'NONE',
29             );
30              
31              
32             has write_groups => (
33             is => 'ro',
34             isa => Str|ArrayRef[Str],
35             required => 1,
36             default => 'NONE',
37             );
38              
39             1;
40              
41             __END__
42              
43             =pod
44              
45             =encoding UTF-8
46              
47             =head1 NAME
48              
49             Yukki::Settings::Privileges - settings describing privileges
50              
51             =head1 VERSION
52              
53             version 0.991_002
54              
55             =head1 DESCRIPTION
56              
57             This just encapsultate privilege requirements to do certain actions.
58              
59             =head1 ATTRIBUTES
60              
61             =head2 anonymous_access_level
62              
63             This should be set to one of the following: read, write, or none. This settings decides how much access an anonymous user has when visiting your wiki.
64              
65             =head2 read_groups
66              
67             This may be set to the word "ANY" or the word "NONE" or to an array of group names.
68              
69             If set to ANY, any logged user may read this repository. If set to NONE, read access is not granted to any logged user (though if C<anonymous_access_level> or C<write_groups> grant a user access, the user will be able to read the repository).
70              
71             If an array of one or more group names are given, the users with any of those groups will be able to read the repository.
72              
73             =head2 write_groups
74              
75             THe possible values that may be set are identicl to C<read_groups>. This setting determines who has permission to edit pages and upload files to the repository.
76              
77             =head1 AUTHOR
78              
79             Andrew Sterling Hanenkamp <hanenkamp@cpan.org>
80              
81             =head1 COPYRIGHT AND LICENSE
82              
83             This software is copyright (c) 2017 by Qubling Software LLC.
84              
85             This is free software; you can redistribute it and/or modify it under
86             the same terms as the Perl 5 programming language system itself.
87              
88             =cut