Mojolicious::Plugin::RoutesAuthDBI::Admin
¡ ¡ ¡ ALL GLORY TO GLORIA ! ! !
WARN
More or less complete! :)
NAME
Mojolicious::Plugin::RoutesAuthDBI::Admin - is a Mojolicious::Controller for manage admin operations on DBI tables: namespaces, controllers, actions, routes, roles, users.
DB DESIGN DIAGRAM
See https://github.com/mche/Mojolicious-Plugin-RoutesAuthDBI/blob/master/Diagram.svg
SYNOPSIS
$app->plugin('RoutesAuthDBI',
...
admin => {< hashref options list below >},
...
);
OPTIONS
namespace
Namespace (string). Defaults to 'Mojolicious::Plugin::RoutesAuthDBI'.
controller
Module controller name. Defaults to 'Admin'.
Both above options determining the loadable module controller as concatenation namespace
::controller
.
prefix
String. Is a prefix for admin urls of this module. Default as name of controller to low case.
trust
String. Is a url subprefix for trust admin urls of this module. See defaults below.
role_admin
String. Is a name of role for admonistrators.
tables
Hashref of any DB tables names. See Mojolicious::Plugin::RoutesAuthDBI::Schema#Default-variables-for-SQL-templates.
Default options
admin = > {
namespace => 'Mojolicious::Plugin::RoutesAuthDBI',
controller => 'Admin',
prefix => 'admin', # lc(<module>)
trust => hmac_sha1_sum('admin', $app->secrets->[0]),
role_admin => 'administrators',
},
Examples options:
admin = {}, # empty hashref sets defaults above
admin => undef, # disable admin controller
admin = > {prefix=>'myadmin', trust => 'foooobaaar'},# admin urls like: /myadmin/foooobaaar/
METHODS NEEDS IN PLUGIN
self_routes()
Builtin to this admin controller routes. Return array of hashrefs routes records for apply route on app. Depends on conf options prefix and trust.
ROUTES
There are number of app routes on this controller. See in console $perl your-app.pl routes
. That routes will not apply then admin controller disabled.
SEE ALSO
Mojolicious::Plugin::RoutesAuthDBI
AUTHOR
Михаил Че (Mikhail Che), <mche [on] cpan.org>
BUGS / CONTRIBUTING
Please report any bugs or feature requests at https://github.com/mche/Mojolicious-Plugin-RoutesAuthDBI/issues. Pull requests also welcome.
COPYRIGHT
Copyright 2016 Mikhail Che.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.