Hide "Update Login Credentials" for SAML Authentication

Within the Primo VE front-end, under My Library Account → Personal Details, users have the ability to change their password via the “Update Login Credentials” link. Because external Alma user data is managed by PeopleSoft (or other campus systems), the ability for users to change their password often needs to be disabled. CSS can be used to hide the link completely, however community borrowers and other internal Alma user accounts who don’t use SAML authentication may need the ability to change their password. To accomplish this, modify the js/custom.js file in the Primo VE customization package to only show the link when the user login type=Alma.

Special thanks to Jessie Cai at CSU San Jose for creating this solution.

  1. From Alma->Configuration->Discovery->Configure Views->(Your View)->Manage Customization Package, download your customization package and extract the files.

  2. Open the js/custom.js file and insert the following JS code before the closing })(); tag:

    // Hide Update Login Credentials for SAML app.component('prmUserAreaExpandableAfter', { bindings: { parentCtrl: '<' }, controller: function($document, $timeout) { var vm = this; var ap = vm.parentCtrl.jwtUtilService.getDecodedToken().authenticationProfile; var signIn = vm.parentCtrl.jwtUtilService.getDecodedToken().signedIn; if (ap === 'Alma') { angular.element(function () { $timeout(function() { var ulcNode = $document[0].querySelector("#changePasswordBtn"); ulcNode.style.display = "block"; }, 3000); });// end angular.element } // end if }// end controller });

     

  3. Save the changes and compress the configuration files as per the customization change process.
    NOTE: If you have hidden the link using CSS, comment out or remove those styles before compressing the configuration files.

  4. Upload the new configuration zip file to Alma->Configuration->Discovery->Configure Views->(Your View)->Manage Customization Package and save the changes.