mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-27 13:51:12 -05:00
If you define a route with the service ID as a typed parameter, ie
```
@main.route('/services/<uuid:service_id>/agreement')
```
then `type(service_id)` returns `<class 'uuid.UUID'>`.
This is a problem when the permissions dictionary stores service IDs as
strings, because trying to look up a user’s permissions with the UUID
fails silently (that key isn’t in the dictionary).
This commit makes sure we always cast the service ID to a string before
using it to check permissions.