ecrin-github / rms-portal-new

RMS Portal with Python backend
MIT License
0 stars 0 forks source link

Superuser in DB is not manager in the app #28

Closed cudillal closed 5 months ago

cudillal commented 7 months ago

The DB contains 2 different 'role' fields for a User: isSuperUser and isStaff, but both are required to be True for a User to be Manager on the app: https://github.com/ecrin-github/rms-portal-new/blob/2b29c666224c03c4a4775585351e20ac8e622533/src/app/pages/internal/main-page/internal-main-page.component.ts#L59 https://github.com/ecrin-github/rms-portal-new/blob/2b29c666224c03c4a4775585351e20ac8e622533/src/app/pages/internal/main-page/internal-main-page.component.ts#L76

iPr0ger commented 6 months ago

Yes, it's true. In the Django user model there are these fields by default. Previously we decided with Swarna to keep them as they are and define if user is Manager by checking both parameters have True. If it's a normal user, so both of the params have False. Not sure it's a bug, but it can be changed if needed.

cudillal commented 5 months ago

I don't think there's anything to test, you can probably just close the issue @sergiocontrino

sergiocontrino commented 5 months ago

yes, remove any logic in the fe involving the staff is for the moment the right solution, closing.