Yancy::Guides::Editor - Configuring and Extending the Yancy Editor
version 1.085
To configure authentication for the editor, first set up an Auth plugin like Yancy::Plugin::Auth or Yancy::Plugin::Auth::Password.
With an authentication plugin configured, the editor will require a logged-in user. To further limit which users can use the editor, set the editor.require_user configuration with a hashref to match against the current user (a "WHERE CLAUSES" in SQL::Abstract matched using "match" in Yancy::Util).
editor.require_user
use Mojolicious::Lite; plugin Yancy => { ... editor => { require_user => { # Users must have "is_admin" set to "1" to use the editor is_admin => 1, }, }, };
To customize how Yancy responds to API requests with data, you can create a custom controller and set the class name as the default_controller. For details how to create a custom controller, see Yancy::Controller::Yancy.
default_controller
use Mojolicious::Lite; plugin Yancy => { ... editor => { default_controller => 'MyController', }, };
This allows you to alter how the editor reads and writes data. For example, you could use it to add authorization to individual rows, or require an approval workflow before displaying content.
Doug Bell <preaction@cpan.org>
This software is copyright (c) 2021 by Doug Bell.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Yancy, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Yancy
CPAN shell
perl -MCPAN -e shell install Yancy
For more information on module installation, please visit the detailed CPAN module installation guide.