¡ ¡ ¡ ALL GLORY TO GLORIA ! ! !
More or less complete! :)
Mojolicious::Plugin::RoutesAuthDBI::Admin - is a Mojolicious::Controller for manage admin operations on DBI tables: namespaces, controllers, actions, routes, roles, users.
See https://github.com/mche/Mojolicious-Plugin-RoutesAuthDBI/blob/master/Diagram.svg
$app->plugin('RoutesAuthDBI', ... admin => {< hashref options list below >}, ... );
Namespace (string). Defaults to 'Mojolicious::Plugin::RoutesAuthDBI'.
Module controller name. Defaults to 'Admin'.
Both above options determining the loadable module controller as concatenation namespace::controller.
namespace
controller
String. Is a prefix for admin urls of this module. Default as name of controller to low case.
String. Is a url subprefix for trust admin urls of this module. See defaults below.
String. Is a name of role for admonistrators.
Hashref of any DB tables names. See Mojolicious::Plugin::RoutesAuthDBI::Schema#Default-variables-for-SQL-templates.
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/
Builtin to this admin controller routes. Return array of hashrefs routes records for apply route on app. Depends on conf options prefix and trust.
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.
$perl your-app.pl routes
Mojolicious::Plugin::RoutesAuthDBI
Михаил Че (Mikhail Che), <mche [on] cpan.org>
<mche [on] cpan.org>
Please report any bugs or feature requests at https://github.com/mche/Mojolicious-Plugin-RoutesAuthDBI/issues. Pull requests also welcome.
Copyright 2016 Mikhail Che.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Mojolicious::Plugin::RoutesAuthDBI, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mojolicious::Plugin::RoutesAuthDBI
CPAN shell
perl -MCPAN -e shell install Mojolicious::Plugin::RoutesAuthDBI
For more information on module installation, please visit the detailed CPAN module installation guide.