TheThingsNetwork / lorawan-stack

The Things Stack, an Open Source LoRaWAN Network Server
https://www.thethingsindustries.com/stack/
Apache License 2.0
973 stars 304 forks source link

Normal users without admin rights can still create apps, gateways #7093

Closed kewe1 closed 4 months ago

kewe1 commented 4 months ago

Summary

On my private TTS environment iothink-solutions.eu1.cloud.thethings.industries. I need to invite some users with limited access and rights that corresponds to their organization.

For some reason, despite having set as a non admin and having those option checked, the user can still create his own application and gateways : image image

Steps to Reproduce

1 invite a new user in user management as approved without admin rights 2 create an organization with roles limiting the user to only see and interact on his organization app 3 connect on this new user 3 the new user can create a new application outside his organization

Current Result

The user shouldn't be authorized to create apps and gateways outside his organization without admin rights

Expected Result

The user can only interact with his application from his organization. Since he is not an admin, he cannot create an app or gateway outside of his organization possible rights.

Relevant Logs

No response

URL

iothink-solutions.eu1.cloud.thethings.industries

Deployment

The Things Stack Cloud

The Things Stack Version

No response

Client Name and Version

No response

Other Information

No response

Proposed Fix

No response

Contributing

Validation

Code of Conduct

nicholaspcr commented 4 months ago

Hello @kewe1, this happens because the tenant configuration is cached. The changes have an affect after 10 minutes, so after this time window the non admin users should not be able to create the referenced entities.

Let me know if this is not the case.

kewe1 commented 4 months ago

Hello @nicholaspcr,

Indeed, when I tested, it was within that 10minute frame, I can confirm that I cannot create applications now as a normal user. Good to know and sorry for creating an issue that was just a cache configuration timing!

Thanks!