NAME
Mojolicious::Plugin::ContextAuth::DB::Permission - Permission object for the ContextAuth database
VERSION
version 0.01
SYNOPSIS
my $db = Mojolicious::Plugin::ContextAuth::DB->new(
dsn => 'sqlite:' . $file,
);
my $permission = Mojolicious::Plugin::ContextAuth::DB::permission->new(
dbh => $db->dbh,
);
my $new_permission = $permission->add(
permission_name => 'test',
permission_description => 'hallo',
);
my $updated_permission = $new_permission->update(
permission_name => 'ernie',
permission_description => 'bert',
);
# create permission object with data for permission id 1
my $found_permission = $permission->load( 1 );
# delete permission
$new_permission->delete;
ATTRIBUTES
dbh
permission_name
permission_description
permission_id
error
METHODS
load
# create permission object with data for permission id 1
my $found_permission = $permission->load( 1 );
add
my $new_permission = $permission->add(
permissionname => 'test',
permission_password => 'hallo',
);
update
my $updated_permission = $new_permission->update(
permissionname => 'ernie',
permission_password => 'bert',
);
delete
$permission->delete;
set_roles
roles
search
AUTHOR
Renee Baecker <reneeb@cpan.org>
COPYRIGHT AND LICENSE
This software is Copyright (c) 2020 by Renee Baecker.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)