UNIBASE

start_html: How to launch Unibase Web Applications

start_html serves as a fundamental and versatile initialization script for all Unibase web applications, streamlining the setup process. By creating a symbolic link to this script within your application’s bin directory, you enable a series of crucial actions that configure the application environment. This includes logging user activity, establishing session variables for staff numbers and email addresses, facilitating customer portal access based on a designated “portalUser” field in a “contacts” table, and managing role-based and user-specific start pages, ultimately ensuring a consistent and properly configured application launch.

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