-
Notifications
You must be signed in to change notification settings - Fork 0
Archive Trac demo app policy
madscatt edited this page Jun 20, 2026
·
1 revision
Legacy Trac archive page imported from
demo_app_policy. Source: https://genapp.rocks/wiki/wiki/demo_app_policy. Review age, links, and examples before treating as current.
Changing Submission Policy of a Module
Submission policy defines who is allowed to use a certain module. We will change the submission policy of the newly created "New Energy" module to the one requiring login to submit. To that end, do the following:
- edit {{{modules/energy.json}}}
- uncomment the {{{"submitpolicy"}}} line:
{
"moduleid" : "energy"
,"label" : "New Energy"
,"help" : "help for New Energy"
,"executable" : "penergy"
,"submitpolicy" : "login" <---- THIS LINE is uncommented
,"uniquedir" : "true"
.......
}
The rest is the same as in prior examples:
- Regenerate ("genapp") the application
- change to the base directory ({{{[path_to]/demo}}})
- run {{{genapp}}} from command line
- Clear the browser's cache
- Go to {{{http://your-ip-address/demo}}}, press "Simulate"
- Now compare behavior of 2 modules:
- press the "Energy" button - this module does not require a login to submit; put some value for a "mass" and press "Submit"
- press the "New Energy" button - this module DOES require a login to submit; put some value for a "mass" and press "Submit"; see what happens
