Force User Login

Developer

Paul Ojennus, Whitworth University

Description

Opens the native Primo login dialog box on load. If the user is logged in or has dismissed the login dialog box the customization does not open the dialog box again on reload.

Primo login form

System Components

PBO, Package Manager

Skill Set Requirements

Primo Back Office (PBO) and JavaScript

Accessibility

The customization uses only native Primo interfaces, so accessibility should be equivalent to out-of-the-box, but the customization has not been tested for accessibility.

Browser Support

Tested on Chrome, Edge, Internet Explorer (Version 11), Firefox, and Safari

Mobile Support

Tested on Android and iPhone

Implementation

Overview

To enable this module, you will need to:

  • Declare the module (step 2)
  • Insert a declaration to hold the code from the Central Package (step 3)

Steps

  1. In the PBO, make sure you have the “Inherit Central Package” box checked.
  2. In your local package, in the custom.js file, include the module ‘forceLogin’ in your app definition. For example:

    var app = angular.module('viewCustom', ['forceLogin']);
  3. If you are using other angular modules, include them in your app definition as well. For example:

    var app = angular.module('viewCustom', ['toggleInstitutions', 'forceLogin']);
  4. Also in the custom.js file, add the following line of code within the anonymous function (that is, before the closing brackets at the end of the file):

    app.component('prmUserAreaExpandableAfter', { bindings: { parentCtrl: '<' }, template: '<force-login></force-login>'});
  5. Zip and upload your package in the PBO.
  6. Deploy your view.