Booking Website

From Guild TV
Jump to: navigation, search


The Guild TV Booking Website uses Booked Shedular. It is hosted on the same machine as the main website.

A plugin has been written to share authentication with the main website.

Inner Workings

This plugin uses the authentication plugin interface of the booking system.

On an attempt for a user to validate, the plugin first loads the user and crew data from the appropriate tables whilst checking the password.

Next, the permissions of the user is loaded, and is tested if the authenticated user has one of the allowed permissions as defined in the config file.

The synchronize method is used to copy certain user data into the booking system database to allow it to store data against users. This allows for names and email addresses to be used in the bookings and for adding other people to reservations.


Usage

To use, the github repo should be cloned as /plugins/Authentication/GuildTV within the root of an existing installation.

The GuildTV.php file should be modified to make the const MYSQL_FILE contain the full path to the mysql configuration to be used.

Lastly, within /config/config.php the following line should be updated

 $conf['settings']['plugins']['Authentication'] = 'GuildTV';

The mysql.json file should contain something similar to:

 {
   "location": "127.0.0.1",
   "database": "gtv_www",
   "username": "gtv_www",
   "password": "",
   
   "permissions": [ 0, 2 ]
 }

Permissions is a list of the ids of the permissions to be allowed access to the system.