Currently the backend sends a string for user_role for user api requests. To avoid unnecessary switch constructs in the frontend, it would be easier to use integers instead.
Access levels in the frontend are defined as following (sadmin to add):
export const accessLevels = {
default: 0, // not logged in
user: 1,
admin: 2,
// (sadmin: 3)
};
Currently the backend sends a string for user_role for user api requests. To avoid unnecessary switch constructs in the frontend, it would be easier to use integers instead.
Access levels in the frontend are defined as following (sadmin to add):