matomo-org / matomo

Empowering People Ethically with the leading open source alternative to Google Analytics that gives you full control over your data. Matomo lets you easily collect data from websites & apps and visualise this data and extract insights. Privacy is built-in. Liberating Web Analytics. Star us on Github? +1. And we love Pull Requests!
https://matomo.org/
GNU General Public License v3.0
19.68k stars 2.62k forks source link

An admin user should be able to share a segment by selecting "This segment is visible to: Any users viewing this website" #6844

Open tsteur opened 9 years ago

tsteur commented 9 years ago

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.

mattab commented 9 years ago

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

tsteur commented 9 years ago

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.

mattab commented 9 years ago

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?

tsteur commented 9 years ago

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

mattab commented 9 years ago

Slightly related to #6766

crazy-max commented 6 years ago

Really need this feature please !

mattab commented 6 years ago

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

crazy-max commented 6 years ago

@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 ?

mattab commented 6 years ago

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

magnus-eriksson commented 3 years ago

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.

MatomoForumNotifications commented 1 year ago

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

mattab commented 9 months ago

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?"

mattmcknight commented 9 months ago

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.