Dsek-LTH / web

The D-guild's primary web page
https://dsek.se
European Union Public License 1.2
22 stars 9 forks source link

Make it easier to fill in roles for door access policies #552

Open danieladugyan opened 2 weeks ago

danieladugyan commented 2 weeks ago

Description

We have a door access policy system (https://www.dsek.se/admin/doors) that allows you to give roles permission to open doors. Right now, this is just a plain text input. We want to ensure users don't input invalid roles in this field.

Image

Solution

Suggestion: add auto-complete based on the position ids stored in the database.

Note that the set of valid roles is a superset of all position ids. For instance, dsek.infu is a valid role since it's derived from infu-positions (e.g. dsek.infu.dwww) but not a valid position.