greenlight icon indicating copy to clipboard operation
greenlight copied to clipboard

How change room owner before deactivate/delete user ?

Open PhilippeAccorsi opened this issue 1 year ago • 3 comments

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.

PhilippeAccorsi avatar May 11 '23 08:05 PhilippeAccorsi

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

scouillard avatar May 12 '23 15:05 scouillard

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.

einhirn avatar May 24 '23 09:05 einhirn

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

PhilippeAccorsi avatar May 24 '23 09:05 PhilippeAccorsi