-
-
11 Oct 2019 06:32:42 UTC
- Distribution: Mojolicious-Plugin-RoutesAuthDBI
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Repository
- Issues (1)
- Testers (220 / 0 / 8)
- Kwalitee
Bus factor: 1- 25.13% Coverage
- License: perl_5
- Perl: v5.14.0
- Activity
24 month- Tools
- Download (39.91KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- Mojolicious::Plugin::RoutesAuthDBI::Install
- NAME
- DB DESIGN DIAGRAM
- Manual
- View schema (define the postgresql schema name and alternative tables names)
- Apply schema (define the postgresql schema name and tables names)
- Sample app
- Define DBI->connect(...) and some plugin options in test-app.pl
- Check list of admin routes:
- Start app
- Trust url for admin-user creation:
- Sign in on browser
- Administration of system ready!
Mojolicious::Plugin::RoutesAuthDBI::Install
¡ ¡ ¡ ALL GLORY TO GLORIA ! ! !
NAME
Mojolicious::Plugin::RoutesAuthDBI::Install - is a Mojolicious::Controller for installation instructions.
DB DESIGN DIAGRAM
See https://github.com/mche/Mojolicious-Plugin-RoutesAuthDBI/blob/master/Diagram.svg
Manual
$ read -d '' CODE <<PERL; perl -Ilib -e "$CODE" get /man use Mojo::Base 'Mojolicious'; sub startup { shift->routes->route('/man') ->to('install#manual', namespace=>'Mojolicious::Plugin::RoutesAuthDBI'); } __PACKAGE__->new->start; PERL
View schema (define the postgresql schema name and alternative tables names)
$ read -d '' CODE <<PERL; perl -Ilib -e "$CODE" get /schema/<name>[?...] # /schema/public?profiles=профили use Mojo::Base 'Mojolicious'; sub startup { shift->routes->route('/schema/:schema') ->to('Schema#schema', namespace=>'Mojolicious::Plugin::RoutesAuthDBI'); } __PACKAGE__->new->start; PERL
Apply schema (define the postgresql schema name and tables names)
$ read -d '' CODE <<PERL; perl -Ilib -e "$CODE" get /schema/<name>[?...] 2>/dev/null | psql -d <dbname> # /schema/<name>?roles=groups use Mojo::Base 'Mojolicious'; sub startup { shift->routes->route('/schema/:schema') ->to('Schema#schema', namespace=>'Mojolicious::Plugin::RoutesAuthDBI'); } __PACKAGE__->new->start; PERL
Sample app
$ read -d '' CODE <<PERL; perl -Ilib -e "$CODE" get /app 2>/dev/null > test-app.pl use Mojo::Base 'Mojolicious'; sub startup { shift->routes->route('/app') ->to('install#sampl_app', namespace=>'Mojolicious::Plugin::RoutesAuthDBI'); } __PACKAGE__->new->start; PERL
Define DBI->connect(...) and some plugin options in test-app.pl
Check list of admin routes:
$ perl test-app.pl routes
Start app
$ perl test-app.pl daemon
Trust url for admin-user creation:
$ perl test-app.pl get /<pluginconf->{admin}{prefix}>/<pluginconf->{admin}{trust}>/user/new/<new admin login>/<admin pass> 2>/dev/null
User will be created and assigned to role 'Admin' . Role 'Admin' assigned to namespace 'Mojolicious::Plugin::RoutesAuthDBI' that has access to all admin controller routes!
Sign in on browser
http://127.0.0.1:3000/sign/in/<new admin login>/<admin pass>
Administration of system ready!
Module Install Instructions
To install Mojolicious::Plugin::RoutesAuthDBI, copy and paste the appropriate command in to your terminal.
cpanm Mojolicious::Plugin::RoutesAuthDBI
perl -MCPAN -e shell install Mojolicious::Plugin::RoutesAuthDBI
For more information on module installation, please visit the detailed CPAN module installation guide.