We need to handle dashboard admins specially so they have admin access to all apps by default, also when adding more apps.
So for dashboard admins it should not be configurable which access they have to apps because they automatically grant admin access to all apps (the access menues shold be greyed out and should show "Admin".
Edited
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
@davor@luka Could anyone of you please review this issue and estimate how much time it would take ? I put it into %0.8.3 and raised the priority because it is blocking the %0.8.3 release. This showed up in our upgrade MR pipeline, see my note regarding this.
The problem boils down to: When a admin user is created with the v0.8 Stackspin branch, and Stackspin is upgraded to the current main branch, the admin user won't have access to any app:
We want to ensure an auto-upgrade, without the user needing manual interventions, so manually changing the app access permissions is not an option, and we also wanted to give admin users admin access to all apps anyway.
@davor Thanks for the MR. But see my comment above, the migration script for existing admin users is the most important part which is blocking the current %0.8.3 release, because of the reasons explained above. Could you please add it ?
The amount of existing installations is very limited right now so we don't need to worry about your concern.
An admin is by definition an admin, so also existing admins should get admin access to all apps.
If we create a new user in dashboard with admin rights - new user should have admin rights for all apps by default?
No not really. Well the way I thought this should be fixed, is that in the logic that checks if a user has access to an app, admin users always have access, and no access right specific to the app is checked at all. That way, admin always have access to all apps, also if you add an app later for example -- without needing any migration.
If we upgrade existing user to dashboard admin - we should update all apps rights to admin?
Same answer as above basically: if this is implemented the way I imagined, you wouldn't need to do anything special in this upgrade case, it would be handled by the same logic that checks app access.
I get your point. So basically if the user is admin, every app role will be resolved to admin so we could remove app role editor from the FE because it doesn't affect anything if the user is admin and e.g. Zulip role is set to user.
So if the user has user dashboard role, then app roles could be set individually (e.g. Zulip can be admin, Wordpress can be user and all others can be No access).
And if I understand you correctly I think that app roles editor should be hidden or disabled if the user dashboard role is set to 'admin' because it would be strange if it would be 'user' Zulip role, but actually in backend it would resolve admin role.
I get your point. So basically if the user is admin, every app role will be resolved to admin so we could remove app role editor from the FE because it doesn't affect anything if the user is admin and e.g. Zulip role is set to user.
Exactly!
Only removing the app role editor is maybe slightly confusing. Maybe we could disable it (grayed out), or remove it but in its place display a short message "Admin users automatically have admin-level access to all apps."?
Just to be sure: The use case we're most focused on right now will work:
create admin user with Stackspin 0.8.2, upgrade to latest main branch including both MRs, and logging into any app as admin will grant admin rights to the app ?
If the user is dashboard admin it doesn't matter what is app access for that user, we're returning 'admin' rights. I've tested backend locally with wordpress and nextcloud where I used a user with dashboard admin and both wordpress and nextcloud no access rights and I logged in normally to both those services.
However, this is excatly the problem which we try to solve. This admin user was created a while ago using and older Stackspin version, and after trying with both related MRs, it doesn't have admin access anymore, without manual changes.
I guess we need to try the upgrade pipeline with these MRs to be sure.
I agree with @varac. I'm not familiar with whole setup from scratch and what is inserted in the DB. Migration scripts should be checked if the upgrades and downgrades are working as expected, I've created only the last migration script so I'm not sure how others work. Maybe it would be good to have dev and testing DB's where testing DB should not be changed manually (without write permissions) so that we can have one DB with data that reflects production?