Reset Squidex Application Access Problem

I had to reset Squidex in production due to issues – it wouldn’t start or something. Still not entirely sure what happened but Orleans kept erroring and Squidex wouldn’t start (bad shutdown it seemed).

Anyway, wiped away the Mongo collections – and it started up fine (without any data). I then copied the backed up collections back into the newly created db sans the Orleans sync stuff (maybe put it in a separate collection?).

Everything worked fine except I couldn’t see the applications. Not sure this is something you want to bother to fix – but it created a new “super user” I guess which didn’t have a reference to the app in the “States_Index_AppsByUsers” collection. When I tried to create an application with the same name it correctly error – but it took me a while to figure out why my super-user couldn’t see the application.

Maybe an admin option “restore access to all applications” or simply a way in the admin to show/hide application access for users? That would make it pretty clear and allow the super-user to restore access to “hidden” applications.

Thanks!

There are so many different topics in this small post. I just make a list of thoughts / ideas:

  1. If you have problems with Orleans and shutting down, it should be enough to clear the membership collection. But it should only cause problems in environments with dynamic IP addresses, such as docker.

  2. If you have a single server I would turn off clustering: https://github.com/Squidex/squidex/blob/master/src/Squidex/appsettings.json#L134. Set it to Development.

  3. The admin user is only created when no other user exists, are you sure that you have copied all collections and that you have copied them in the right order? I would copy them first and then restart squidex.

  4. A restore option is not possible, because I not have the users behind the old IDs, but I could add an option to give the super user access to all apps. But I am not sure if I want to do it because I do not want to have this control in the cloud version.

  1. Correct: it’s a docker swarm with 3 replicas. I thought I tried just clearing the membership collection – I’ll let how that works if happens again.

  2. Good to know!

  3. Yeah, I copy and pasted the entire db (this is in Studio3T) – which seemed to work fine. But I let Squdiex re-create the system because it wasn’t loading – and merged the resulting collections. A pretty rare situation, to be sure.

  4. I understand. Now I know how I fix it, it won’t be a problem here, either.

Thanks for your help!