Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How change room owner before deactivate/delete user ? #5178

Open
PhilippeAccorsi opened this issue May 11, 2023 · 3 comments
Open

How change room owner before deactivate/delete user ? #5178

PhilippeAccorsi opened this issue May 11, 2023 · 3 comments
Labels

Comments

@PhilippeAccorsi
Copy link

Hi,

With Greenlight V2 we can merged an account and this action change the owner of the room before delete user.

I not seen something like that in V3. Is it a regression or is it no more available ?

We use BBB in company and some rooms are created by user but when user quit the company we need to save the room.

@scouillard
Copy link
Contributor

I believe that banning the user instead of deleting it would solve your issue. Would that be possible?

@einhirn
Copy link
Contributor

einhirn commented May 24, 2023

Dig into the database...

greenlight-v3-production=# select Name,id from users where name='TargetUser' or name ='SourceUser';
                  name                   |                  id
-----------------------------------------+--------------------------------------
TargetUser                               | 96133afa-a0d6-499b-834a-562e328e8c22
SourceUser                               | bce755d3-b0c2-40b0-9ea0-6349932369a4

greenlight-v3-production=#  update rooms set user_id='96133afa-a0d6-499b-834a-562e328e8c22' where user_id='bce755d3-b0c2-40b0-9ea0-6349932369a4';
UPDATE 1

you'll need to change the requested User names above and of course your IDs will be different. Perhaps one could work some SQL magic to do it in one query without copy&paste, but this way was quicker for me to write down.

BTW: In a dockerized setup I can work on the DB by

docker exec -it root_db14_1 psql -U postgres greenlight-v3-production

The container name root_db14_1 might differ and if you didn't use the postgres container with default settings, you'll perhaps need to enter a password or use a different user than postgres.

In our environment the DB container isn't exposed beyond the docker containers started within the same docker_compose.yml (No ports exposed, default docker networking, no host network mode), that's why security settings are pretty low for that particular instance.

@PhilippeAccorsi
Copy link
Author

Yes, We have doing this in the same way.
Directly in the database, but this is not user freindly :) :) :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants