###############################################################################
## Gantry Examples
###############################################################################
PerlWarn On
##===========================================================================##
## Shared Resources.
##===========================================================================##
<Perl>
#!/usr/bin/perl
use Data::FormValidator;
use Gantry::Utils::Validate;
use Gantry::Utils::HTML qw( :all );
use Gantry::Utils::AuthCDBI;
use Gantry::Control::C::Users;
use Gantry::Control::C::Groups;
use Gantry::Control::C::Pages;
use Gantry::Control::C::Authen qw/-Engine=MP13/;
use Gantry::Control::C::Authz qw/-Engine=MP13/;
use Gantry::Control::C::Authz::PageBased qw/-Engine=MP13/;
</Perl>
##===========================================================================##
## Auth Locations
##===========================================================================##
# required for Gantry auth modules
PerlOptions +GlobalRequest
<Location /admin>
PerlSetVar page_title "Admin"
PerlSetVar app_rootp /admin
PerlSetVar img_rootp /images
PerlSetVar css_rootp /css
# ****** CHANGE TO YOUR GANTRY TEMPLATE DIRECTORY *******
PerlSetVar root "/home/tkeefer/src/Gantry/root"
PerlSetVar wrapper "control_wrapper.tt"
PerlSetVar auth_dbconn "dbi:Pg:dbname=..."
PerlSetVar auth_dbuser ""
PerlSetVar auth_dbpass ""
AuthType Basic
AuthName "Gantry User Administration"
PerlAuthenHandler Gantry::Control::C::Authen
PerlAuthzHandler Gantry::Control::C::Authz
</Location>
<Location /admin/users>
SetHandler perl-script
PerlHandler Gantry::Control::C::Users
require group admin
</Location>
<Location /admin/pages>
SetHandler perl-script
PerlHandler Gantry::Control::C::Pages
require group admin
</Location>
<Location /admin/groups>
SetHandler perl-script
PerlHandler Gantry::Control::C::Groups
require group admin
</Location>