Details
-
New Feature
-
Status: Closed
-
TBD
-
Resolution: Fixed
-
None
-
None
-
None
-
Undetermined
Description
The SessionController for the REST resource doesn't appear to handle "custom" representations.
Prior to a recent change, the controller handled converting to the rep simply by passing the REP into the "convertToRepresentation" method when converting the User. In this case, custom rep would be handled, but only if the custom reps were reps for a user.
This is wrong, but had been in use... in Core Apps, the program, program status and relationships widget used the session and passed in a user-based custom rep: "custom:(privileges)". (Not custom:(user:(privileges)) which would be the correct rep for a "session")
Then, recently, we expanded the session to include the session location, and this tries to convert it to the rep as well:
After this change, the request that the program, program status, and relationship widget now fails if there's a location in the session.
Ideally, we should change the session controller so that it can properly handle and parse custom reps, but, at a minimum, we should change it so that it returns the default versions of user and session location, or leave it as-is but document that it doesn't support custom representations.