Element-web: No way to promote/demote people in a group

Created on 11 Oct 2017  Â·  22Comments  Â·  Source: vector-im/element-web

Description

This is particularly needed if someone creates a group by accident and wants to hand it off to someone else. In my case, I removed myself from the group, leaving my other account stuck with a group they can't manage. I should be able to promote people using power levels or similar.

Would be even nicer if multiple people could be at the same level.

Version information

  • Platform: web (in-browser)
  • Browser: Chrome 61
  • OS: Windows 10
  • URL: riot.im/develop
feature p1 spaces

Most helpful comment

While waiting for the official functionality my team has been fiddling with this in the production database.
We've added group admins a few times and haven't had any problems yet.

Here are the instructions I wrote:

Here’s how to make someone a community admin.

All community members can be listed using:

SELECT * FROM group_users;

Start a transaction and set a user as admin in a certain community:

BEGIN;
UPDATE group_users SET is_admin='t' WHERE group_id='+community:domain.com' AND user_id='@user:domain.com';

Make sure that only one row is updated. You should see UPDATE 1. You could also list the community members again to see the result. If everything is correct, commit the change:

COMMIT;

If everything went wrong just rollback the changes:

ROLLBACK;

All 22 comments

the fact users can't delegate admin to other users is a massive pain in terms of letting them define a sensible community structure.

and bus-factorness.

Not to mention I really want to be able to delegate admin of my communities to my bot :wink:

This would be an excellent feature:)

While waiting for the official functionality my team has been fiddling with this in the production database.
We've added group admins a few times and haven't had any problems yet.

Here are the instructions I wrote:

Here’s how to make someone a community admin.

All community members can be listed using:

SELECT * FROM group_users;

Start a transaction and set a user as admin in a certain community:

BEGIN;
UPDATE group_users SET is_admin='t' WHERE group_id='+community:domain.com' AND user_id='@user:domain.com';

Make sure that only one row is updated. You should see UPDATE 1. You could also list the community members again to see the result. If everything is correct, commit the change:

COMMIT;

If everything went wrong just rollback the changes:

ROLLBACK;

Is there a hack in the client to do this ?

@subins2000 nope, the API does not support it yet.

In Discord, there are "Server Mods/Admin" (equivalent to having mods/admins in communities)

@t3chguy Should this be a Synapse feature request then ?

Someone linked this PR in an old synapse PR: https://github.com/matrix-org/synapse/issues/3926 and appears to have closed it based on this issue being a duplicate, however, it is clear that this is a data layer request and not a UI request.

While waiting for the official functionality my team has been fiddling with this in the production database.
We've added group admins a few times and haven't had any problems yet.

Here are the instructions I wrote:

Here’s how to make someone a community admin.
All community members can be listed using:

SELECT * FROM group_users;

Start a transaction and set a user as admin in a certain community:

BEGIN;
UPDATE group_users SET is_admin='t' WHERE group_id='+community:domain.com' AND user_id='@user:domain.com';

Make sure that only one row is updated. You should see UPDATE 1. You could also list the community members again to see the result. If everything is correct, commit the change:

COMMIT;

If everything went wrong just rollback the changes:

ROLLBACK;

@kenneth-larsson, can you please explain to me how to safely Update rows in the database ?

What I tried :

  • Stop matrix-synapse.service
  • Update rows
  • Start service

But then some rooms, communities or chat history is unavaible, until I ROLLBACK;

@RicoNosa

@kenneth-larsson, can you please explain to me how to safely Update rows in the database ?

What I tried :
* Stop matrix-synapse.service
* Update rows
* Start service

But then some rooms, communities or chat history is unavaible, until I ROLLBACK;

That's strange. Are the database changes available for all users (the Synapse service account) before they're committed?
We have always committed the changes to the database before verifying in Synapse. I guess you can revert a one-row-change as easy as doing a rollback(?).
Also, you might need to reconnect to notice the community admin change.

We do this while Synapse is running and we're still using Synapse v0.34.1.1-py3 (in Docker with a separate container for Postgres). We will upgrade to Synapse v1 later this year, but we still haven't tested if this works there.

I cannot guarantee that this update is safe, but it works for us.
The reason we use BEGIN / COMMIT / ROLLBACK is to safely check that the change only affect the row we want (we usually don't change more than one row at the time).

Just to make sure, by "groups", you mean what's now called "communities", right?

Yup

I just fell into the same trap, when I created a community room with an inappropriate user.

If I had known this before, I would have created a special admin user just for this room, so the credentials could be passed to the admin/moderator.

As long as the feature is not available, this should be prominently mentioned in the first steps guides.

[...]

If I had known this before, I would have created a special admin user just for this room, so the credentials could be passed to the admin/moderator.

Now I'm confused. I've just found out, that I can click on a room member and change his privilege level via a drop-down list box.

Isn't that the feature, which was reported missing?

Isn't that the feature, which was reported missing?

Promoting and demoting people in rooms works perfectly fine. There is yet no equivalent for communities however, which are "a level above" rooms.

Ah! Thank you.

I still have to get used to the terminology: room vs. group/community.
I checked the FAQ now.

I understood a "group" as a group of persons, rather than a group of rooms.

This issue is giving us a headache, as we've got an international conference coming up, and thus would need the group admin to be 100% available 24h/7d, which is... not a healthy approach to adminship :)

What can we do to help this 2 years p1 level issue be resolved?

@marcusmueller well you could sponsor work on communities. Contacting @matthew:matrix.org is probably the best way to do that.

Though if you are running an international conference surely you have the resources to host your own Matrix server where you could just edit the database to get multiple admins.

@marcusmueller well you could sponsor work on communities. Contacting @matthew:matrix.org is probably the best way to do that.

:) will have a talk with backoffice about funding delegation; we're a FOSS project ourselves, might or might not be easy to cross-fund another project. I'll honestly discuss this, though!

Though if you are running an international conference surely you have the resources to host your own Matrix server where you could just edit the database to get multiple admins.

We indeed do have a hosted server of our own and we're aware of the ability to just add admins in the Synapse database (and as FOSS project, running our own Synapse / paying someone to keep it running does seem a bit out of the standard)!

Sadly, as you can imagine, we'd like to give our conference committee the freedom to promote group admins on the fly, so that's not really much of an option.

Point is, even me adding an appropriate group/<group_id>/add_admin_user (or similar) RestServlet in Synapse that would make it possible do that via API isn't going to help much if it then doesn't fit philosophy of the client who'd use it most. Now, my Python is OK, my JS / TS certainly isn't. I could best case contribute that server feature. So, if I do that, I'd like some guidance on what the Element frontend wants to see to avoid wasting TS developer cycles.

For what it's worth, I have used many times the is_admin='t' SQL trick above on communities without ever stopping the matrix service and never encountered any issue.

Nevertheless, I haven't looked at the code but there are inconsistencies between the user panel of Rooms and Communities which let me guess that the code is the same and there already but not functioning properly in the context of communities. In particular:

  • The Avatar doesn't show up
  • The Online status says 'Unknown'
  • The Role banner and edit button seems missing but maybe it just hides because of the context

Is this going to stay unfixed until Communities v2 ?

image

Is this going to stay unfixed until Communities v2 ?

Almost certainly, yes.

Was this page helpful?
0 / 5 - 0 ratings