NAME
WWW::Suffit::AuthDB::Realm - WWW::Suffit::AuthDB realm class
SYNOPSIS
use WWW::Suffit::AuthDB::Realm;
DESCRIPTION
This module provides AuthDB realm methods
is_valid
Check the realm object
mark
Marks object as cached
ATTRIBUTES
- is_allowed
-
$realm->is_allowed( username => "admin", groupname => ["wheel", "administrators"] ) or die "Access denied";Returns true if specified username or groupname have access to the page by realm
- description
-
$realm->description('Root page'); my $description = $realm->description;Sets and returns description of the realm
- is_valid
-
$realm->is_valid or die "Incorrect realm";Returns boolean status of realm's data
- realm
-
$realm->realm('root'); my $realm_name = $realm->realm;Sets and returns realm value of the realm object
- requires
-
$realm->requires(['@alice', '%wheel']); my $requires = $relam->requires; # ['@alice', '%wheel']Sets and returns groups and users of realm (array of users and groups)
Note! Usernames should be prefixed with "@", group names should be prefixed with "%"
- requires_users
-
my $reqs = $relam->requires; # [ {user => 'alice'}, { group => 'wheel'} ]Returns list of requiremets (as array ref) that allows access to specified realm
HISTORY
See Changes file
TO DO
See TODO file
SEE ALSO
WWW::Suffit::AuthDB, Mojolicious
AUTHOR
Serż Minus (Sergey Lepenkov) https://www.serzik.com <abalama@cpan.org>
COPYRIGHT
Copyright (C) 1998-2023 D&D Corporation. All Rights Reserved
LICENSE
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See LICENSE file and https://dev.perl.org/licenses/