matomo icon indicating copy to clipboard operation
matomo copied to clipboard

A write/admin user should be able to share a segment by selecting "This segment is visible to: Any users viewing this website"

Open tsteur opened this issue 11 years ago • 17 comments

Currently, only a super user can create a segment that is visible to all users but I think it makes sense to let admins select this as well as an admin can also create users etc. The other two options (displayed for all websites and archive yes/no) should still be only configurable for a super user.

tsteur avatar Dec 11 '14 22:12 tsteur

as an admin can also create users

actually no: to create users you must be Super User...

let admins select this as well as an admin can also create users

The reason it was not done is that it would let any admin user impact the features of all view users. So imagine if you are a web agency and have 10 clients in your Piwik server. These users are set as admin so they can add their own users etc. if one of those 10 admins could also share segments with all view users, then one of the 10 clients could share data with other 9 clients (and any view users they created) without realising. Also those 9 admin users don't care about the segment from this other admin user...

This is maybe a wider issue with Piwik permissions that we could think about at some point. See also the popular #4314

mattab avatar Dec 15 '14 00:12 mattab

Don't see it like this. And users actually ask for it especially when in a cloud. You can't give everyone super user permission just for this. I don't think there are always so many admins that create so many different segments. Maybe it is then rather an issue to let admins and super users select whether they want to share it with other users or not.

tsteur avatar Dec 15 '14 00:12 tsteur

I got a bit confused by the issue title which mentions "all users" but IMO it's not possible to let an admin user impact all users. So maybe the following works?

  1. An admin user should not be able to choose and displayed for ALL WEBSITES
  2. An admin user should not be able to set This segment is visible to: ALL USERS
      1. and 2) are already implemented
  3. An admin user should be able to share a segment by clicking This segment is visible to: USERS VIEWING THIS WEBSITE.

is 3. what you had in mind?

mattab avatar Dec 15 '14 22:12 mattab

yep, 3 is what I had in mind. With all users system wide wouldn't make any sense but with all users having access to that website

tsteur avatar Dec 15 '14 22:12 tsteur

Slightly related to #6766

mattab avatar Mar 03 '15 22:03 mattab

Really need this feature please !

crazy-max avatar May 31 '18 12:05 crazy-max

We won't be working on it soon, so pull request welcome!

mattab avatar May 31 '18 12:05 mattab

@mattab After reading many issues concerning permissions i think the permission / user manager implementation has to be refactored. We should have X roles implemented for each site. Roles could be powered by the core and plugins using the permissions management API. Maybe open a new issue to discuss about this ?

crazy-max avatar May 31 '18 12:05 crazy-max

we don't want to refactor or introduce more complex permission system in this particular issue here (this may be a good idea, but not the scope of this "simple" issue). So we still want to allow admin to create segments visible to all users having access to a website, and this could be implemented without considering the whole refactor

mattab avatar May 31 '18 13:05 mattab

I don't get how this can be such an issue that you haven't sorted it out in 7 years!?

Creating segments and share them with others is crucial for slightly larger organizations (like ours).

It's not feasible to make everyone that might want to make a complex segment available for others to be Super user. I can buy that you need to be an admin to be able to add options for other users (ofc within the same site), but not Super User.

A Super User should be someone that more or less configures the ins and outs of the application on a broader scope, not for day-to-day usage of the application (which creating segments are).

It's really concerning for us to read all the "we won't..." and "do a pull request" answers here. We're a business that have to focus on our own services, which is why we opted for a ready-made service like Matomo to begin with.

magnus-eriksson avatar May 07 '21 06:05 magnus-eriksson

This issue has been mentioned on Matomo forums. There might be relevant details there:

https://forum.matomo.org/t/sharing-segments-between-users-as-a-normal-user/49317/3

FYI This issue has been mentioned on Matomo forums. There might be relevant details there:

https://forum.matomo.org/t/sharing-segments-between-users-as-a-normal-user/49317/3

And another comment from https://github.com/matomo-org/matomo/issues/20778

Another request from a customer for the ability to share segments from Admin users "Our company we have few people who use Matomo, the problem is that they can not share segments to entire company. Only Super Users (who also has administration access) can share segments. It creates extra work for us, because then only the person with Super User rights, can approve these segments and make them visible for everybody. Could you add possibility to the user rights to make segments visible for everybody, but still keep the user rights away from administration part?"

mattab avatar Dec 14 '23 03:12 mattab

Would also like to see this. We use Matomo for our SaaS application. Each customer (and we have over 500) gets a segment for reporting and monitoring purposes. However, we can't share segments between users, so if we have 4 support and sales people associated with the customer, they all end up creating the same segment. It would be so much easier if they could share the segment. As it is, I am spending hours cleaning them them up and sharing them with all, because our IT security won't let everyone be a super user. Is there an easy way to do this (create segment shared with all) with the API? I couldn't find one, but was thinking of coding up a separate tool for this or working it into our customer account creation scripts.

mattmcknight avatar Dec 26 '23 01:12 mattmcknight

A cloud customer was looking to share some segments and was confused as to why only Super Users could do this. They would like to see this option available for other user roles such as Admins.

goochj03 avatar Oct 06 '24 20:10 goochj03

I've had another customer request to allow Admin users to share segments. They were initially confused as to why they were unable to do this as an Admin.

goochj03 avatar Dec 18 '24 21:12 goochj03

Today I've had a cloud customer request to allow Admin users to share segments.

paul-buttimore avatar Sep 21 '25 22:09 paul-buttimore

This feature be still relevant. We may even want to think about letting users with WRITE permissions share

tsteur avatar Nov 19 '25 20:11 tsteur