UNIBASE

start_html: Generic web application startups

start_html is a generic start script for all Unibase web applications.

To use this, symbolically link it to the bin directory for your application:

ln -s /usr/local/lib/ub/bin/start_html /usr/local/app/<your application>/bin

start_html does many important things to set up an application.

  • Logs the user in /var/log/messages (from REMOTE_USER)
  • puts STAFFNO into the session which makes it available as an environment variable in the application
  • puts EMAIL_USER into session file. Same. EMAIL_USER is the user email address.
  • Customer portal access is provided.
    • You must create a table named “contacts” and include a field named “portalUser” within it.
    • If the field “portalUser” has the REMOTE_USER as it’s value then the start page for the contact is the customer portal
    • The customer portal is a report “customer_portal.rep “. You run this by specifying the customer_id as the match value.Needed for customer specific reports.
  • User roles are supported
    • if a user has one role then the start page for that role is run
  • If the user has a start HTML page then that is run
  • Otherwise, an error occurs, and the application reloads the login page.

Verified by MonsterInsights