absmach / magistrala

Industrial IoT Messaging and Device Management Platform
https://www.abstractmachines.fr/magistrala.html
Apache License 2.0
2.42k stars 665 forks source link

MG-2201 - Fail role update if user does not exist #2234

Closed JeffMboya closed 2 weeks ago

JeffMboya commented 1 month ago

What type of PR is this?

This is a feature because it adds the following functionality: client check check in policy layer when updating client role.

What does this do?

This PR modifies the update client role functionality to check for client existence in the policy layer (spiceDB) instead of the repo layer. This prevents the system from adding a policy for a non-existent user and then having to roll it back.

Which issue(s) does this PR fix/relate to?

Have you included tests for your changes?

No

Did you document any new/modified feature?

No