Restrict moderator access to only the stats panel on the admin dashboard?

I would like to know if it would be possible to make moderators have access to stats only when they access the admin dashboard.

I don’t want some moderators to have access to the “users”, “logs” and “plugins” tab.

2 Likes

No, not possible. And I don’t understand why you want that. I know it is April 1st but… Surely you trust your own moderators to view logs and the actual user list they are meant to be moderating.

2 Likes

lol. has nothing to do with April 1 though. Just asking to see if one can edit capabilities just as we do on WordPress.

Just thinking of having staff that can be posting and track pageviews to see how the site is performing. Nothing else.

Have them visit the /about page if they need basic stats.

4 Likes

No pageviews stats displayed at : About - NetDivo Forum

It seems that you have edited manually the content in the About page. You might have deleted the generated stats. Not 100% sure though, as I don’t remember exactly if you have the ability to delete them. @ondrejj can you confirm?

1 Like

I found an use case that might be interesting for this, maybe not a moderator but an user with access to the great analytics that Discourse already generates.

Imagine a forum that uses some kind of marketing campaigns, yes Analytics is good, maybe Matomo or any other, but having the analytics built in give a more precise metric and there’s no need to run another tool for the same result.

So, having some kind of role that is able to access the admin dashboard and the metrics would be great to communities that use marketing or run campaigns to promote theirself.

2 Likes

For what it’s worth, we’d also greatly appreciate this capability. We’ve wanted to give direct access to admin reports to non-moderators for grant-writing and/or marketing purposes. By and large, they just want stats like signups, posts, likes, page_view_total_reqs and topics from /admin/reports/X.

The ability to hand off an API key with just this report access (and no other admin capabilities) would be awesome. We’d probably want the handful of reports that expose private info turned off (like user_notes, user_flagging_ratio, and staff_logins), but all other admin reports are entirely summary stats and don’t require admin-level (or even moderator-level) trust to view IMO.

2 Likes

You can add data explorer query rights to arbitrary groups, which can cover any reporting needs.

2 Likes

The data explorer requires a significantly higher threshold of trust as you can use it to see all private user data the system contains, including emails, private messages, mod actions, and more.

Edit: oh, I see, you can just whitelist individual queries, not rights to the entire UI.

1 Like

No it doesn’t.

Group permission allows the specified group to only “execute” previously created queries.

1 Like

Ah, cool! Is there a playground where our users can play around and build queries? The Data Explorer UI is really helpful in navigating the table structure.

Is it possible to get a shared Data Explorer query export programmatically? Doing the naive thing — accessing https://discourse.example.com/g/group/reports/123.json — doesn’t work like it does for the official reports page. Instead of actually doing the query it just returns the raw SQL itself.

Edit: ah, it’s How to run Data Explorer queries with the Discourse API

I am still so much interested in this feature. A staff/author that can just post to the forum but also have access to STATS only.

We hire writers but still want them to see STATS only so they can see if their contribution is helping the forum grow or not.

JetPack makes this easy for WordPress users and I believe it’s doable here too.

1 Like

I do think the Data Explorer plugin can do exactly what you want here, but it unfortunately requires some SQL know-how to set up the queries. Once you have the queries you want you can make them available to any group of users as you prefer.

https://meta.discourse.org/t/what-cool-data-explorer-queries-have-you-come-up-with/43516/279

2 Likes

Thanks. If it can, then I think it will be easier for discourse to implement the feature for those of us that can’t really make use of the data explorer option. Just my two cents…

I’m surprised that there hasn’t been more interest in this. I understand many being guarded on stats, but I’d love to grant our moderators access to the stats page.

3 Likes

I wonder if anyone found some workaround here…I am still looking the most convenient way to give mods access to reports

With data-explorer you could create a query that would make any data you desire available for moderators or a custom group.

2 Likes

We also now have the SQL for many of the dashboard reports here on meta (dashboard-sql) so you can easily replicate them in data explorer and allow access to a specific group without needing to grant full moderator status. :+1:

Using this in combination with the category moderator feature would allow you to give certain users some moderator abilities and access to statistics without giving them access to the other moderator areas.

1 Like