Skip to content
Snippets Groups Projects
Commit 9e7621ab authored by Nicholas Blair's avatar Nicholas Blair
Browse files

Merge branch 'alternate-profiles' into 'master'

feature: Add uw-frame compatible REST API for /profile

This pull request adds a REST resource under `/profile` that transforms the current `UWUserDetails` into a format matching [uw-frame's session.json feed](https://github.com/UW-Madison-DoIT/uw-frame/blob/master/uw-frame-components/staticFeeds/session.json).

With this feature in place, uw-frame apps will be able to have the user attributes from the UW Spring Security principal display in the frame header.

Here's the familiar Amy Administrator, as output from `GET /profile/uw-frame`:

```
{
  username: "admin",
  displayName: "Amy Administrator",
  firstName: "Amy",
  lastName: "Administrator",
  serverName: "",
  version: "",
  sessionKey: ""
}
```

To configure this feature in a uw-frame app, one needs to create a file named `src/main/webapp/js/override.js` (if not already present) with the following contents:

```
define(['angular'], function(angular) {
    var config = angular.module('override', []);
    config
        .constant('OVERRIDE', {
            'SERVICE_LOC': {
                'sessionInfo' : 'profile/uw-frame',
            }
        })
    ;
    return config;
});
```

Notify @andrew-petro @levett @ahoffmann @paul.erickson @bjsousa @andrew-summers @alundholm 

To assignee @dwitter2 - the plan is to use this for capital-equipment and iaa-diagnostic-tool, among others, then we no longer have the mismatch in our demos (with frame defaulting to showing one logged in as 'Bucky'). 

See merge request !10
parents e8e8f011 c6eb2c05
No related branches found
No related tags found
1 merge request!10feature: Add uw-frame compatible REST API for /profile
Showing
with 414 additions and 24 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment