We use Discourse for our volunteer run, member based organisation and I’d like to know if there is a quick way of getting a report of group membership.
We currently have about 60 users and 20 groups as we use our Discourse to help run our organisation, especially where the shortfalls of email emerge in group discussions.
I find some of interfacing with Discourse permissions a bit limiting sometimes. I come from IT sysadmin, so I’m used to being able to nest groups in things like Active Directory, but I hope I’m not projecting too much of that onto Discourse, as they are obviously very different things.
I’m hoping to easily produce a report that has a list of who is in what group to help me keep our categories organised and consume less time.
I know this will only be possible if I keep the group membership up to date, but this is the best way I’m aware of.
I assume that group nesting is not possible?
What is the rationale behind having the mechanism that throws this error?
I understand that you wouldn’t want a child category to be accessible when the parent category is not(that is fine for a shared network drive, but it does not make sense in Discourse)
But could you possibly change it to an alert that the group in question is not accessible by the parent category, and by continuing with this change, they will be added with the minimum needed(or a selectable level) permissions?
There might be a Data Explorer query which could surface that info for you? A list of each group, and the members in each group? That’s what you’re looking for?
If this information is what you need, these queries can help you.
LIST NAME GROUPS
SELECT
g.name group_name,
user_count
FROM groups g
ORDER BY g.name ASC
LIST GROUP AND MEMBERS
-- [params]
-- string :group_name
SELECT
g.name group_name,
u.username user_name,
gu.owner group_owner
FROM group_users gu
LEFT JOIN groups g ON gu.group_id = g.id
LEFT JOIN users u ON gu.user_id = u.id
WHERE user_id > 0
AND g.name LIKE '%'||:group_name||'%'
ORDER BY g.name ASC, gu.owner DESC
LIST ALL GROUPS AND MEMBERS
SELECT
g.name group_name,
u.username user_name,
gu.owner group_owner
FROM group_users gu
LEFT JOIN groups g ON gu.group_id = g.id
LEFT JOIN users u ON gu.user_id = u.id
WHERE user_id > 0
ORDER BY g.name ASC, gu.owner DESC