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

Feature: Domain users unassign optimization #2280

Open arvindh123 opened 2 weeks ago

arvindh123 commented 2 weeks ago

Is your feature request related to a problem? Please describe.

Yes, In Domain users unassign endpoint, we can provide multiple users for removal. Lets take example user ids ["user_id_1", "user_id_2", "user_id_3"]

Domain users unassign has a for loop. If it fails in second loop, then second and third user id are not removed and first user is remove. The REST response will error, but in the response we could not say which all users are removed successfully and which all users not removed and which user got error

Describe the feature you are requesting, as well as the possible use case(s) for it.

Option 1:

Instead of having users as array, remove one user at a time.

Option 2:

Created a deatiled report in response error about which user ids are removed , which user id got error and which user ids are not removed

Option 3:

Just respond only the user id which got error . To know the removed and unremoved users , list again the domain users .

Option 4:

Let it be as it is now. Don't say which userid got error . To know the removed and unremoved users , list again the domain users .

Indicate the importance of this feature to you.

Must-have

Anything else?

No response

arvindh123 commented 2 weeks ago

Waiting for PR https://github.com/absmach/magistrala/pull/2197 to merge