C1. Add session-check function in OTBS with following code. (See figure 1 to 4.)
If Session[:uid] is true, the system will display the corresponding page info;
If Session[:uid] is false, the system will request user to login.

Figure 1. Passenger's index.rhtml page

Figure 2. Passenger's new.rhtml page.
Figure 3. Passenger's show.rhtml page
Figure 4. Passenger's edit.rhtml page.
C2. Check the session of OTBS.
i.) If you directly access the passenger's index/new/edit page, it will requests user to login. (see video 1.)
沒有留言:
發佈留言