ugent / Studieplekken

The Study Rooms (Studieplekken) application facilitates work and study places within UGent, HOGENT, Arteveldehogeschool, Odisee, LUCA, KU Leuven and the City of Ghent.
https://bloklocaties.stad.gent
MIT License
11 stars 1 forks source link

Authentication service improvements #122

Closed EwoutV closed 1 year ago

EwoutV commented 1 year ago

Methods like isLoggedIn(), isAdmin() etc... should not reside in the authentication service as it can sometimes be ambiguous when the user has been fetched. In order to prevent race conditions, these methods were moved in the user class. The application loads an empty user on page load, before replacing it with the user from the backend. Now we don't need to worry about undefined users anymore.