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 => {< options 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.

Default options

admin = > {
  namespace => 'Mojolicious::Plugin::RoutesAuthDBI',
  controller => 'Admin',
  prefix => 'admin', # lc(<module>)
  trust => hmac_sha1_sum('admin', $app->secrets->[0]),
},

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 access controller routes. Return array of hashrefs routes records for apply route on app. Depends on conf options prefix and trust.

SEE ALSO

Mojolicious::Plugin::RoutesAuthDBI

Mojolicious::Plugin::RoutesAuthDBI::Sth

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.