Check user privileges and adapt UI accordingly

We somehow have to get some info from the steering API what the user is allowed to do. According to that a user may either change everything in a show and add new shows and timeslots, or they only may change certain types of info for a show and for timeslots and notes.

Currently the user object returned by steering on endpoint /api/v1/users/ has two items which relate to the permissions a user has:

  • is_staff tells us if a user is actually a superuser and is allowed to add shows and timeslots and basically change everything through the REST API. If a user is not staff the user only may change their own show information and notes, and they are not allowed to generate new timeslots for their shows.
  • user_permissions is an array which is currently always empty. We should use this to tell users what exactly they are allowed to do. Also regarding a user's show we have to implement something that allows users to only change certain fields. This has to be done in the steering module first.