# This is the main configuration file of your Dancer2 app
# env-related settings should go to environments/$env.yml
# all the settings in this file will be loaded at Dancer's startup.
# Your application's name
appname: "DPAE"
# The default layout to use for your application (located in
# views/layouts/main.tt)
layout: "main"
# when the charset is set to UTF-8 Dancer2 will handle for you
# all the magic of encoding and decoding. You should not care
# about unicode within your app when this setting is set (recommended).
charset: "UTF-8"
# template engine
# simple: default and very basic template engine
# template_toolkit: TT
template: "template_toolkit"
#template: "simple"
session: "simple"
engines:
template:
template_toolkit:
start_tag: '<%'
end_tag: '%>'
EVAL_PERL: 0
PLUGINS:
# Dumper: "Template::Plugin::DataPrinter" # doesn't work for this app - WTF??
logger: # loaded in symlink to console.yml
plugins:
# DPAE::Plugin::Admin:
Admin:
permission_denied_handler: permission_denied
session_user_var: logged_in_user
users:
- admin
# D2::Plugin::Database:
Database:
dsn: "dbi:mysql:database=hilis4;mysql_read_default_file=~/.local/mysql.cnf"
connection_check_threshold: 10
dbi_params:
RaiseError: 1
AutoCommit: 1
# to suppress debug msg "adding mysql_enable_utf8 to DBI connection params
# to enable UTF-8 support":
mysql_enable_utf8: 1
# log_queries: 1 # only dumps D::P::Database method queries (quick_select, etc)
# D2::Plugin::DBIC:
DBIC:
default:
dsn: "dbi:mysql:database=hilis4;mysql_read_default_file=~/.local/mysql.cnf"
schema_class: DPAE::Schema
# D2::Plugin::Auth::Extensible:
Auth::Extensible:
# denied_page needs setting to arbitrary value otherwise get redirect
# loop (see DOM inspector/Network) - value appears in url:
# http://localhost:5000/<denied_page_val>?return_url=%2Fbeer
denied_page: denied
exit_page: '/login'
# no_default_pages: 1
# no_login_handler: 1
# access denied sub, or if using no_default_pages, use a route/auto_page + .tt:
permission_denied_page_handler: "DPAE::permission_denied"
realms:
config:
provider: Config
users:
- user: admin
name: Administrator
# pass = admin:
pass: "{SSHA}8K77LIkwTXb4kzEQFJaBBEJTq3RwAix0"
roles:
- Admin
- user: swiller
name: Beer Drinker
# pass = swiller
pass: "{SSHA}ObyxoSBBroRNiBASPzr5XCV+bQepPg3e"
roles:
- Admin
- BeerDrinker
- VodkaDrinker
database:
provider: DPAE::Plugin::Provider::DB
db_name: hilis4
db_cols:
users_table: users
roles_table: user_functions
# using view to accomodate default group + custom user permissions
user_roles_table: views.user_permission
# optionally set the column names (see the SUGGESTED SCHEMA
# section below for the default names; if you use them, they'll
# Just Work)
users_id_column: id
roles_id_column: id
roles_role_column: function_name
users_username_column: username
users_password_column: password
# user_role -> users FK:
user_roles_user_id_column: user_id
# user_role -> roles FK:
user_roles_role_id_column: roles_id
disable_roles: 0
# for user_profile (optional - for use in .tt);
roles_key: roles