Skip to content

Archive Trac demo app policy

madscatt edited this page Jun 20, 2026 · 1 revision

Demo App Policy

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.

3. Demo GenApp Application

d. Modifying Demo Application

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

demo_site_submitpolicies.png

Previous | Up | Next

Clone this wiki locally