├── .editorconfig
├── .github
└── FUNDING.yml
├── .gitignore
├── .htaccess
├── .travis.yml
├── Application.cfc
├── CHANGELOG.md
├── LICENSE
├── README.md
├── box.json
├── config
├── app.cfm
├── development
│ └── settings.cfm
├── environment.cfm
├── maintenance
│ └── settings.cfm
├── production
│ └── settings.cfm
├── routes.cfm
├── settings.cfm
└── testing
│ └── settings.cfm
├── controllers
├── Accounts.cfc
├── Controller.cfc
├── Main.cfc
├── PasswordResets.cfc
├── Register.cfc
├── Sessions.cfc
├── admin
│ ├── Auditlogs.cfc
│ ├── Permissions.cfc
│ ├── Roles.cfc
│ ├── Settings.cfc
│ ├── UserPermissions.cfc
│ └── Users.cfc
└── functions
│ ├── auth.cfm
│ └── filters.cfm
├── events
├── onabort.cfm
├── onapplicationend.cfm
├── onapplicationstart.cfm
├── onerror.cfm
├── onmaintenance.cfm
├── onmissingtemplate.cfm
├── onrequestend.cfm
├── onrequeststart.cfm
├── onsessionend.cfm
└── onsessionstart.cfm
├── files
└── .keep
├── global
├── auth.cfm
├── functions.cfm
├── install.cfm
├── logging.cfm
└── utils.cfm
├── images
└── .keep
├── index.cfm
├── javascripts
├── .keep
└── custom.js
├── migrator
└── migrations
│ ├── 20180519095317_Creates_User_Table.cfc
│ ├── 20180519100056_Creates_Roles_Table.cfc
│ ├── 20180519100244_Creates_Permissions_Table.cfc
│ ├── 20180519100412_Creates_RolePermissions_Table.cfc
│ ├── 20180519100428_Creates_UserPermissions_Table.cfc
│ ├── 20180519100429_Creates_Settings_Table.cfc
│ ├── 20180519100430_Creates_Auditlog_Table.cfc
│ ├── 20180519105943_Adds_Default_Roles.cfc
│ ├── 20180519105944_Adds_Default_UserAccounts.cfc
│ ├── 20180519105945_Adds_Default_Settings.cfc
│ ├── 20180519105946_Adds_Default_Permissions.cfc
│ ├── 20180519105947_Adds_Default_UserPermissions.cfc
│ └── 20180519105948_Adds_Dummy_Auditlogs.cfc
├── miscellaneous
└── Application.cfc
├── models
├── Auditlog.cfc
├── Model.cfc
├── Permission.cfc
├── Role.cfc
├── RolePermission.cfc
├── Setting.cfc
├── User.cfc
├── UserPermission.cfc
└── auth
│ ├── LDAP.cfc
│ └── Local.cfc
├── plugins
├── .keep
├── FlashMessagesBootstrap-1.0.2.zip
├── authenticateThis-1.0.1.zip
└── jsconfirm-1.0.5.zip
├── rewrite.cfm
├── root.cfm
├── server-exampleappACF.json
├── server.json
├── stylesheets
├── .keep
└── custom.css
├── tests
├── Test.cfc
├── functions
│ ├── Auth.cfc
│ ├── Permissions.cfc
│ ├── Utils.cfc
│ └── models
│ │ ├── Auditlog.cfc
│ │ ├── Permission.cfc
│ │ ├── Role.cfc
│ │ └── User.cfc
└── requests
│ ├── Accounts.cfc
│ ├── Main.cfc
│ └── Sessions.cfc
├── urlrewrite.xml
├── views
├── accounts
│ ├── edit.cfm
│ ├── resetPassword.cfm
│ └── show.cfm
├── admin
│ ├── auditlogs
│ │ ├── _filter.cfm
│ │ ├── _modal.cfm
│ │ └── index.cfm
│ ├── permissions
│ │ ├── _form.cfm
│ │ ├── edit.cfm
│ │ └── index.cfm
│ ├── roles
│ │ ├── _form.cfm
│ │ ├── edit.cfm
│ │ ├── index.cfm
│ │ └── new.cfm
│ ├── settings
│ │ ├── _form.cfm
│ │ ├── edit.cfm
│ │ └── index.cfm
│ ├── userpermissions
│ │ └── index.cfm
│ └── users
│ │ ├── _filter.cfm
│ │ ├── edit.cfm
│ │ ├── form
│ │ ├── _auth.cfm
│ │ ├── _details.cfm
│ │ └── _role.cfm
│ │ ├── index.cfm
│ │ ├── new.cfm
│ │ └── show.cfm
├── emails
│ ├── _footer.cfm
│ ├── _header.cfm
│ ├── passwordReset.cfm
│ ├── passwordResetAdmin.cfm
│ ├── passwordResetAdminPlain.cfm
│ ├── passwordResetPlain.cfm
│ ├── verify.cfm
│ └── verifyPlain.cfm
├── helpers.cfm
├── layout.cfm
├── layout
│ ├── _footer.cfm
│ └── _navigation.cfm
├── main
│ └── index.cfm
├── passwordresets
│ ├── edit.cfm
│ └── new.cfm
├── register
│ └── new.cfm
├── sessions
│ └── new.cfm
└── wheels
│ ├── layout.cfm
│ └── wheels.cfm
└── wheels
├── CHANGELOG.md
├── Controller.cfc
├── Dispatch.cfc
├── LICENSE
├── Mapper.cfc
├── Migrator.cfc
├── Model.cfc
├── Plugins.cfc
├── Public.cfc
├── Test.cfc
├── controller
├── appfunctions.cfm
├── caching.cfm
├── csrf.cfm
├── filters.cfm
├── flash.cfm
├── functions.cfm
├── initialization.cfm
├── layouts.cfm
├── miscellaneous.cfm
├── processing.cfm
├── provides.cfm
├── redirection.cfm
├── rendering.cfm
└── verifies.cfm
├── dispatch
└── functions.cfm
├── events
├── onabort.cfm
├── onapplicationend.cfm
├── onapplicationstart.cfm
├── onerror.cfm
├── onerror
│ ├── cfmlerror.cfm
│ └── wheelserror.cfm
├── onmissingtemplate.cfm
├── onrequest.cfm
├── onrequestend.cfm
├── onrequestend
│ └── debug.cfm
├── onrequeststart.cfm
├── onsessionend.cfm
└── onsessionstart.cfm
├── functions.cfm
├── global
├── appfunctions.cfm
├── cfml.cfm
├── functions.cfm
├── internal.cfm
├── misc.cfm
└── util.cfm
├── index.cfm
├── mapper
├── functions.cfm
├── initialization.cfm
├── mapping.cfm
├── matching.cfm
├── resources.cfm
├── scoping.cfm
└── utilities.cfm
├── migrator
├── Base.cfc
├── ColumnDefinition.cfc
├── ForeignKeyDefinition.cfc
├── Migration.cfc
├── TableDefinition.cfc
├── ViewDefinition.cfc
├── adapters
│ ├── Abstract.cfc
│ ├── H2.cfc
│ ├── MicrosoftSQLServer.cfc
│ ├── MySQL.cfc
│ └── PostgreSQL.cfc
├── basefunctions.cfm
├── functions.cfm
└── templates
│ ├── announce.cfc
│ ├── blank.cfc
│ ├── change-column.cfc
│ ├── change-table.cfc
│ ├── create-column.cfc
│ ├── create-index.cfc
│ ├── create-record.cfc
│ ├── create-table.cfc
│ ├── execute.cfc
│ ├── remove-column.cfc
│ ├── remove-index.cfc
│ ├── remove-record.cfc
│ ├── remove-table.cfc
│ ├── rename-column.cfc
│ ├── rename-table.cfc
│ └── update-record.cfc
├── model
├── adapters
│ ├── Base.cfc
│ ├── H2.cfc
│ ├── MySQL.cfc
│ ├── Oracle.cfc
│ ├── PostgreSQL.cfc
│ ├── SQLServer.cfc
│ └── cfquery.cfm
├── associations.cfm
├── calculations.cfm
├── callbacks.cfm
├── create.cfm
├── delete.cfm
├── errors.cfm
├── functions.cfm
├── initialization.cfm
├── miscellaneous.cfm
├── nestedproperties.cfm
├── onmissingmethod.cfm
├── properties.cfm
├── read.cfm
├── serialize.cfm
├── sql.cfm
├── transactions.cfm
├── update.cfm
└── validations.cfm
├── plugins
├── functions.cfm
├── initialization.cfm
└── standalone
│ └── injection.cfm
├── public
├── README.md
├── assets
│ ├── .gitignore
│ └── semantic
│ │ └── dist
│ │ ├── semantic.min.css
│ │ └── semantic.min.js
├── docs
│ ├── core.cfm
│ ├── layouts
│ │ ├── html.cfm
│ │ └── json.cfm
│ └── reference
│ │ ├── controller
│ │ ├── addformat.txt
│ │ ├── authenticitytokenfield.txt
│ │ ├── autolink.txt
│ │ ├── buttontag.txt
│ │ ├── buttonto.txt
│ │ ├── caches.txt
│ │ ├── capitalize.txt
│ │ ├── checkbox.txt
│ │ ├── checkboxtag.txt
│ │ ├── columndataforproperty.txt
│ │ ├── columnforproperty.txt
│ │ ├── columnnames.txt
│ │ ├── columns.txt
│ │ ├── compareto.txt
│ │ ├── contentfor.txt
│ │ ├── contentforlayout.txt
│ │ ├── controller.txt
│ │ ├── csrfmetatags.txt
│ │ ├── cycle.txt
│ │ ├── dateselect.txt
│ │ ├── dateselecttags.txt
│ │ ├── datetimeselect.txt
│ │ ├── datetimeselecttags.txt
│ │ ├── dayselecttag.txt
│ │ ├── deobfuscateparam.txt
│ │ ├── distanceoftimeinwords.txt
│ │ ├── endformtag.txt
│ │ ├── excerpt.txt
│ │ ├── filefield.txt
│ │ ├── filefieldtag.txt
│ │ ├── filterchain.txt
│ │ ├── filters.txt
│ │ ├── flash.txt
│ │ ├── flashclear.txt
│ │ ├── flashcount.txt
│ │ ├── flashdelete.txt
│ │ ├── flashinsert.txt
│ │ ├── flashisempty.txt
│ │ ├── flashkeep.txt
│ │ ├── flashkeyexists.txt
│ │ ├── flashmessages.txt
│ │ ├── get.txt
│ │ ├── hasmanycheckbox.txt
│ │ ├── hasmanyradiobutton.txt
│ │ ├── hiddenfield.txt
│ │ ├── hiddenfieldtag.txt
│ │ ├── highlight.txt
│ │ ├── hourselecttag.txt
│ │ ├── humanize.txt
│ │ ├── hyphenize.txt
│ │ ├── imagetag.txt
│ │ ├── includecontent.txt
│ │ ├── includedinobject.txt
│ │ ├── includelayout.txt
│ │ ├── includepartial.txt
│ │ ├── isajax.txt
│ │ ├── isget.txt
│ │ ├── ispost.txt
│ │ ├── issecure.txt
│ │ ├── javascriptincludetag.txt
│ │ ├── linkto.txt
│ │ ├── mailto.txt
│ │ ├── mimetypes.txt
│ │ ├── minuteselecttag.txt
│ │ ├── model.txt
│ │ ├── monthselecttag.txt
│ │ ├── obfuscateparam.txt
│ │ ├── onlyprovides.txt
│ │ ├── pagination.txt
│ │ ├── paginationlinks.txt
│ │ ├── passwordfield.txt
│ │ ├── passwordfieldtag.txt
│ │ ├── pluginnames.txt
│ │ ├── pluralize.txt
│ │ ├── provides.txt
│ │ ├── radiobutton.txt
│ │ ├── radiobuttontag.txt
│ │ ├── redirectto.txt
│ │ ├── rendernothing.txt
│ │ ├── renderpartial.txt
│ │ ├── rendertext.txt
│ │ ├── renderview.txt
│ │ ├── renderwith.txt
│ │ ├── resetcycle.txt
│ │ ├── response.txt
│ │ ├── secondselecttag.txt
│ │ ├── select.txt
│ │ ├── selecttag.txt
│ │ ├── sendemail.txt
│ │ ├── sendfile.txt
│ │ ├── set.txt
│ │ ├── setfilterchain.txt
│ │ ├── setpagination.txt
│ │ ├── setresponse.txt
│ │ ├── setverificationchain.txt
│ │ ├── simpleformat.txt
│ │ ├── singularize.txt
│ │ ├── startformtag.txt
│ │ ├── striplinks.txt
│ │ ├── striptags.txt
│ │ ├── stylesheetlinktag.txt
│ │ ├── submittag.txt
│ │ ├── textarea.txt
│ │ ├── textareatag.txt
│ │ ├── textfield.txt
│ │ ├── textfieldtag.txt
│ │ ├── timeagoinwords.txt
│ │ ├── timeselect.txt
│ │ ├── timeselecttags.txt
│ │ ├── timeuntilinwords.txt
│ │ ├── titleize.txt
│ │ ├── truncate.txt
│ │ ├── urlfor.txt
│ │ ├── useslayout.txt
│ │ ├── verificationchain.txt
│ │ ├── verifies.txt
│ │ ├── wordtruncate.txt
│ │ └── yearselecttag.txt
│ │ ├── deprecated
│ │ └── findorcreateby[property].txt
│ │ ├── mapper
│ │ ├── collection.txt
│ │ ├── delete.txt
│ │ ├── end.txt
│ │ ├── get.txt
│ │ ├── mapper.txt
│ │ ├── member.txt
│ │ ├── namespace.txt
│ │ ├── package.txt
│ │ ├── patch.txt
│ │ ├── post.txt
│ │ ├── put.txt
│ │ ├── resource.txt
│ │ ├── resources.txt
│ │ ├── root.txt
│ │ ├── scope.txt
│ │ └── wildcard.txt
│ │ ├── migration
│ │ ├── addcolumn.txt
│ │ ├── addindex.txt
│ │ ├── addrecord.txt
│ │ ├── changecolumn.txt
│ │ ├── changetable.txt
│ │ ├── createtable.txt
│ │ ├── down.txt
│ │ ├── removeindex.txt
│ │ └── up.txt
│ │ ├── migrator
│ │ ├── createmigration.txt
│ │ ├── getavailablemigrations.txt
│ │ ├── getcurrentmigrationversion.txt
│ │ └── migrateto.txt
│ │ └── model
│ │ ├── accessibleproperties.txt
│ │ ├── adderror.txt
│ │ ├── adderrortobase.txt
│ │ ├── aftercreate.txt
│ │ ├── afterdelete.txt
│ │ ├── afterfind.txt
│ │ ├── afterinitialization.txt
│ │ ├── afternew.txt
│ │ ├── aftersave.txt
│ │ ├── afterupdate.txt
│ │ ├── aftervalidation.txt
│ │ ├── aftervalidationoncreate.txt
│ │ ├── aftervalidationonupdate.txt
│ │ ├── allchanges.txt
│ │ ├── allerrors.txt
│ │ ├── automaticvalidations.txt
│ │ ├── average.txt
│ │ ├── beforecreate.txt
│ │ ├── beforedelete.txt
│ │ ├── beforesave.txt
│ │ ├── beforeupdate.txt
│ │ ├── beforevalidation.txt
│ │ ├── beforevalidationoncreate.txt
│ │ ├── beforevalidationonupdate.txt
│ │ ├── belongsto.txt
│ │ ├── changedfrom.txt
│ │ ├── changedproperties.txt
│ │ ├── clearchangeinformation.txt
│ │ ├── clearerrors.txt
│ │ ├── count.txt
│ │ ├── create.txt
│ │ ├── datasource.txt
│ │ ├── delete.txt
│ │ ├── deleteall.txt
│ │ ├── deletebykey.txt
│ │ ├── deleteone.txt
│ │ ├── errorcount.txt
│ │ ├── errormessageon.txt
│ │ ├── errormessagesfor.txt
│ │ ├── errorson.txt
│ │ ├── errorsonbase.txt
│ │ ├── exists.txt
│ │ ├── findall.txt
│ │ ├── findallkeys.txt
│ │ ├── findbykey.txt
│ │ ├── findone.txt
│ │ ├── gettablenameprefix.txt
│ │ ├── haschanged.txt
│ │ ├── haserrors.txt
│ │ ├── hasmany.txt
│ │ ├── hasone.txt
│ │ ├── hasproperty.txt
│ │ ├── invokewithtransaction.txt
│ │ ├── isclass.txt
│ │ ├── isinstance.txt
│ │ ├── isnew.txt
│ │ ├── key.txt
│ │ ├── maximum.txt
│ │ ├── minimum.txt
│ │ ├── nestedproperties.txt
│ │ ├── new.txt
│ │ ├── primarykey.txt
│ │ ├── primarykeys.txt
│ │ ├── properties.txt
│ │ ├── property.txt
│ │ ├── propertyispresent.txt
│ │ ├── propertynames.txt
│ │ ├── protectedproperties.txt
│ │ ├── reload.txt
│ │ ├── save.txt
│ │ ├── setprimarykey.txt
│ │ ├── setprimarykeys.txt
│ │ ├── setproperties.txt
│ │ ├── settablenameprefix.txt
│ │ ├── sum.txt
│ │ ├── table.txt
│ │ ├── tablename.txt
│ │ ├── toggle.txt
│ │ ├── update.txt
│ │ ├── updateall.txt
│ │ ├── updatebykey.txt
│ │ ├── updateone.txt
│ │ ├── updateproperty.txt
│ │ ├── valid.txt
│ │ ├── validate.txt
│ │ ├── validateoncreate.txt
│ │ ├── validateonupdate.txt
│ │ ├── validatesconfirmationof.txt
│ │ ├── validatesexclusionof.txt
│ │ ├── validatesformatof.txt
│ │ ├── validatesinclusionof.txt
│ │ ├── validateslengthof.txt
│ │ ├── validatesnumericalityof.txt
│ │ ├── validatespresenceof.txt
│ │ ├── validatesuniquenessof.txt
│ │ └── validationtypeforproperty.txt
├── functions.cfm
├── helpers.cfm
├── includes.cfm
├── initialization.cfm
├── layout
│ ├── _footer.cfm
│ ├── _footer_simple.cfm
│ ├── _header.cfm
│ ├── _header_simple.cfm
│ └── _navigation.cfm
├── migrator
│ ├── _navigation.cfm
│ ├── command.cfm
│ ├── sql.cfm
│ └── templating.cfm
├── routes.cfm
├── tests
│ ├── _navigation.cfm
│ ├── html.cfm
│ ├── json.cfm
│ ├── junit.cfm
│ └── txt.cfm
└── views
│ ├── cli.cfm
│ ├── congratulations.cfm
│ ├── docs.cfm
│ ├── info.cfm
│ ├── migrator.cfm
│ ├── packages.cfm
│ ├── pluginentry.cfm
│ ├── plugins.cfm
│ ├── routes.cfm
│ ├── routetester.cfm
│ ├── templating.cfm
│ └── tests.cfm
├── test
└── functions.cfm
├── vendor
└── toXml
│ └── toXML.cfc
└── view
├── assets.cfm
├── csrf.cfm
├── errors.cfm
├── forms.cfm
├── formsassociation.cfm
├── formsdate.cfm
├── formsdateobject.cfm
├── formsdateplain.cfm
├── formsobject.cfm
├── formsplain.cfm
├── functions.cfm
├── links.cfm
├── miscellaneous.cfm
└── sanitize.cfm
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | charset = utf-8
5 | end_of_line = lf
6 | indent_style = tab
7 | insert_final_newline = true
8 | trim_trailing_whitespace = true
9 |
--------------------------------------------------------------------------------
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | # These are supported funding model platforms
2 |
3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4 | patreon: # Replace with a single Patreon username
5 | open_collective: cfwheels
6 | ko_fi: # Replace with a single Ko-fi username
7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9 | liberapay: # Replace with a single Liberapay username
10 | issuehunt: # Replace with a single IssueHunt username
11 | otechie: # Replace with a single Otechie username
12 | lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
13 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
14 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .project
2 | CFIDE
3 | cfide
4 | WEB-INF
5 | /target
6 | /.settings
7 | /.classpath
8 | /temp/
9 | /bluedragon/
10 | /manual/
11 | /subfolder/
12 | /bin/
13 | /migrator/sql/
14 | cfwheels.*.zip
15 | settings.json
16 | .vscode
17 | /plugins/**/
18 |
--------------------------------------------------------------------------------
/.htaccess:
--------------------------------------------------------------------------------
1 | Options +FollowSymLinks
2 | RewriteEngine On
3 | RewriteCond %{REQUEST_URI} ^.*/index.cfm/(.*)$ [NC]
4 | RewriteRule ^.*/index.cfm/(.*)$ ./rewrite.cfm/$1 [NS,L]
5 | RewriteCond %{REQUEST_URI} !^.*/(flex2gateway|jrunscripts|cfide|cf_scripts|cfformgateway|cffileservlet|lucee|files|images|javascripts|miscellaneous|stylesheets|wheels/public/assets|robots.txt|favicon.ico|sitemap.xml|rewrite.cfm)($|/.*$) [NC]
6 | RewriteRule ^(.*)$ ./rewrite.cfm/$1 [NS,L]
7 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: java
2 | sudo: required
3 | services:
4 | - mysql
5 | jdk:
6 | - oraclejdk8
7 | env:
8 | matrix:
9 | - CFENGINE=lucee@5 DB=MySQL DBCLASS=org.gjt.mm.mysql.Driver
10 | before_install:
11 | # Get Commandbox
12 | - sudo apt-key adv --keyserver keys.gnupg.net --recv 6DA70622
13 | - sudo echo "deb http://downloads.ortussolutions.com/debs/noarch /" | sudo tee -a /etc/apt/sources.list.d/commandbox.list
14 | install:
15 | # Install Commandbox
16 | - sudo apt-get update && sudo apt-get --assume-yes install commandbox
17 | # Install Wheels CLI
18 | - box version
19 | - box install cfwheels-cli
20 | # Install CFConfig
21 | - box install commandbox-cfconfig
22 | # Install CFWheels Example App from git master
23 | - box install cfwheels/cfwheels-example-app
24 | before_script:
25 | # Create database
26 | - if [[ "$DB" == "MySQL" ]]; then mysql -e 'CREATE DATABASE exampleapp;'; fi
27 | # Start The Server
28 | - box server start
29 | # Add the datasource via CFConfig
30 | - if [[ "$DB" == "MySQL" ]]; then box cfconfig datasource save name=exampleapp database=exampleapp dbdriver=$DB class="$DBCLASS" host=127.0.0.1 port=3306 username=travis password=""; fi
31 | # CFConfig seems to require a server restart to register the DB
32 | - box server restart
33 | # Basically, we now run the wheels CLI test runner, pointing it to the current server
34 | - box cfconfig datasource list
35 | # Double check servername?
36 | - box server list
37 | # Run DB Migrations
38 | script: >
39 | testResults="$(box wheels test type=app servername=exampleapp)";
40 | echo "$testResults";
41 | if ! grep -i "\Tests Complete: All Good!" <<< $testResults; then exit 1; fi
42 | notifications:
43 | email: false
44 |
--------------------------------------------------------------------------------
/Application.cfc:
--------------------------------------------------------------------------------
1 | component output="false" {
2 | include "wheels/functions.cfm";
3 | }
4 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # CFWheels Example App
2 |
3 | 
4 |
5 | This sample application is *not* a complete Content Management System, and is more of a starting point for your own
6 | applications; it aims to demonstrate some of the framework's features such as Database migrations, routing etc.
7 |
8 | ## Installation
9 |
10 | See [Installation](https://github.com/cfwheels/cfwheels-example-app/wiki/Installation)
11 |
12 | ## Documentation
13 |
14 | See the [Wiki](https://github.com/cfwheels/cfwheels-example-app/wiki/Installation)
15 |
16 | ## Requirements
17 |
18 | - CommandBox (to run locally)
19 | - Tested on Lucee 5.2.7 / ACF 2016
20 | - MySQL 5.x
21 |
--------------------------------------------------------------------------------
/config/development/settings.cfm:
--------------------------------------------------------------------------------
1 |
7 | Sorry, but you're not allowed to access that.
8 |
14 | Sorry, that caused an unexpected error.Denied!
6 | Error!
13 |
15 | Please try again later.
16 |
5 | Sorry, maintenance work is being performed.
6 | Please try again later.
7 |
5 | Sorry, the page you requested could not be found.
6 | Please verify the address.
7 |
" + highlighted + "" 11 | ); 12 | }); 13 | }); 14 | 15 | // Logging highlighting 16 | function syntaxHighlight(json) { 17 | json = json.replace(/&/g, '&').replace(//g, '>'); 18 | return json.replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)/g, function (match) { 19 | var cls = 'number'; 20 | if (/^"/.test(match)) { 21 | if (/:$/.test(match)) { 22 | cls = 'key'; 23 | } else { 24 | cls = 'string'; 25 | } 26 | } else if (/true|false/.test(match)) { 27 | cls = 'boolean'; 28 | } else if (/null/.test(match)) { 29 | cls = 'null'; 30 | } 31 | return '' + match + ''; 32 | }); 33 | } 34 | 35 | }); 36 | -------------------------------------------------------------------------------- /miscellaneous/Application.cfc: -------------------------------------------------------------------------------- 1 | /* 2 | You can place CFML code in this folder and run it independently from CFWheels. 3 | This empty "Application.cfc" file makes sure that CFWheels does not interfere with the request. 4 | */ 5 | component { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /models/Auditlog.cfc: -------------------------------------------------------------------------------- 1 | component extends="Model" 2 | { 3 | function config() { 4 | // Properties 5 | validatesPresenceOf("message,type,severity,createdBy,ipaddress"); 6 | afterNew("serializeExtendedData"); 7 | } 8 | 9 | /** 10 | * If anything is passed into data, serialize if at all possible 11 | */ 12 | function serializeExtendedData() { 13 | if(structKeyExists(this, "data")) 14 | this.data=serializeJSON(this.data); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /models/Permission.cfc: -------------------------------------------------------------------------------- 1 | component extends="Model" 2 | { 3 | function config() { 4 | // Associations 5 | hasMany(name="rolepermissions", jointype="left"); 6 | hasMany(name="userpermissions"); 7 | nestedProperties(associations="rolepermissions,userpermissions", allowDelete=true); 8 | 9 | // Properties 10 | validatesUniquenessOf("name"); 11 | validatesPresenceOf("name,type"); 12 | validatesInclusionOf( 13 | property="type", 14 | list="named,controller", message="Invalid Permission Type" ); 15 | 16 | beforeValidation("validatePermissionName"); 17 | 18 | } 19 | 20 | /** 21 | * This is a bit lazy. Really should use regEx. 22 | **/ 23 | function validatePermissionName(){ 24 | if(structKeyExists(this, "name") && structKeyExists(this, "type")){ 25 | if(this.type == 'named'){ 26 | if(this.name CONTAINS "." || this.name CONTAINS " "){ 27 | addError(property="name", message="Named Permission Name should not contain dots or spaces"); 28 | } 29 | } 30 | if(this.type == 'controller'){ 31 | if(this.name CONTAINS " "){ 32 | addError(property="name", message="Controller Permission Name should not contain spaces"); 33 | } 34 | } 35 | } 36 | } 37 | 38 | 39 | } 40 | -------------------------------------------------------------------------------- /models/Role.cfc: -------------------------------------------------------------------------------- 1 | component extends="Model" { 2 | 3 | function config() { 4 | // Associations 5 | hasMany("rolepermissions"); 6 | 7 | // Properties 8 | validatesPresenceOf("name"); 9 | validatesUniquenessOf(properties="name", message="Role name must be unique"); 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /models/RolePermission.cfc: -------------------------------------------------------------------------------- 1 | component extends="Model" { 2 | 3 | function config() { 4 | // Associations 5 | belongsTo("role"); 6 | belongsTo("permission"); 7 | 8 | // Properties 9 | validatesPresenceOf("roleid,permissionid"); 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /models/Setting.cfc: -------------------------------------------------------------------------------- 1 | component extends="Model" { 2 | 3 | function config() { 4 | // Properties 5 | validatesPresenceOf("name,description,type,value,editable"); 6 | validatesUniquenessOf(properties="name", message="Setting name must be unique"); 7 | validatesFormatOf(property="editable", type="boolean"); 8 | validatesInclusionOf(property="type", list="select,boolean,textfield", message="Invalid Setting Type" ); 9 | 10 | beforeValidation("serializeValue"); 11 | afterFind("deserializeValue"); 12 | } 13 | 14 | // If updating a setting, serialize its value 15 | function serializeValue(){ 16 | if(structKeyExists(this, "value") && !isJSON(this.value)) 17 | this.value=serializeJSON(this.value); 18 | } 19 | 20 | // Deserialize Setting Value after find - used in when updating application settings 21 | function deserializeValue(){ 22 | if(structKeyExists(this, "value") && isJSON(this.value)) 23 | this.value=deserializeJSON(this.value); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /models/UserPermission.cfc: -------------------------------------------------------------------------------- 1 | component extends="Model" { 2 | 3 | function config() { 4 | // Associations 5 | belongsTo("user"); 6 | belongsTo("permission"); 7 | 8 | // Properties 9 | validatesPresenceOf("userid,permissionid"); 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /plugins/.keep: -------------------------------------------------------------------------------- 1 | /*.zip 2 | /*/ 3 | -------------------------------------------------------------------------------- /plugins/FlashMessagesBootstrap-1.0.2.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wheels-dev/cfwheels-example-app/6e6401b9e184798321748de08c8ffbce51b16bdd/plugins/FlashMessagesBootstrap-1.0.2.zip -------------------------------------------------------------------------------- /plugins/authenticateThis-1.0.1.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wheels-dev/cfwheels-example-app/6e6401b9e184798321748de08c8ffbce51b16bdd/plugins/authenticateThis-1.0.1.zip -------------------------------------------------------------------------------- /plugins/jsconfirm-1.0.5.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wheels-dev/cfwheels-example-app/6e6401b9e184798321748de08c8ffbce51b16bdd/plugins/jsconfirm-1.0.5.zip -------------------------------------------------------------------------------- /rewrite.cfm: -------------------------------------------------------------------------------- 1 |