Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add capability editing to users manager #13842

Merged
merged 7 commits into from Dec 17, 2018
Merged

Conversation

diosmosis
Copy link
Member

@diosmosis diosmosis commented Dec 13, 2018

Fixes #13842

Capability editing:

image

Capability tooltip:

image

Capability help in form:

image

filter by capability:

image

filter by capability in paged users list:

image

@diosmosis diosmosis added not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. Needs Review PRs that need a code review labels Dec 13, 2018
@diosmosis diosmosis added this to the 3.8.0 milestone Dec 13, 2018
@tsteur
Copy link
Member

tsteur commented Dec 13, 2018

image
Seeing only "write" there we may need to prefix the category? But then might take too much space... or could we group them by category name? Or maybe it's just renaming the name of the "Write" category now to "Tag Manager Write". I guess also the other capabilities may not be clear what they refer to unless you hover the tooltip. At the same time I like the compact style.

Do we also need ability to set capabilities when giving access to all websites? Maybe not needed for now?

@diosmosis
Copy link
Member Author

Seeing only "write" there we may need to prefix the category? But then might take too much space... or could we group them by category name?

Didn't know there was a category, will see what it looks like.

Do we also need ability to set capabilities when giving access to all websites? Maybe not needed for now?

I'm not sure (cc @mattab). I guess if it's ok to just add Capability: ... to the dropdown, then it would be pretty simple to do.

@diosmosis
Copy link
Member Author

We could also show capabilities one on each row, and perhaps make the list expandable so you'd only see:

capability 1
capability 2
see more

until clicking 'see more'.

Having one on each row looked pretty good, but it did make the rows a lot bigger.

@tsteur
Copy link
Member

tsteur commented Dec 13, 2018

Not sure what it would look like... would it be possibly by default show kind of as regular text no capabilities if none, or the assigned capabilities as words if some are granted Tag Manager: Write, Publish Live Container. So Category: capabilities, Category: Capabilities. It would be only one row because Tag Manager is the only plugin defining it so far.

This only viewing what the current state is. To assign them, we could have behind each page an edit /expand button? I know it could be quite painful when wanting to grant many capabilities to many sites, but for this we also have the bulk actions... and I reckon those capabilities are very rarely used. So personally I'd be fine with that.

Or maybe we could somehow use chips which are a bit more efficient?

@diosmosis
Copy link
Member Author

Chips might work if we combine it w/ a dropdown (ie, instead of the user typing in a new chip, the blank chip is a select w/ the list of available capabilities).

If a capability is included in a role, we could show it w/ the remove icon disabled. Will try it.

@tsteur
Copy link
Member

tsteur commented Dec 13, 2018

image

I just remember we have this UI field as well in Custom Reports called expandable-select.

<div piwik-field uicontrol="expandable-select" name="..."
                             full-width="true"
                             ng-change="editReport...."
                             title="..."
                             ng-model="editReport.report...."
                             options="editReport....">
                        </div>

not sure if that maybe is useful?

@diosmosis
Copy link
Member Author

Could help, thanks!

@diosmosis
Copy link
Member Author

@tsteur changed to use chips + added capabilities to add access to all sites + to bulk actions. screenshot:

image

@tsteur
Copy link
Member

tsteur commented Dec 14, 2018

Looks good 👍

@diosmosis diosmosis merged commit ef39088 into 3.x-dev Dec 17, 2018
@diosmosis diosmosis deleted the 13194-capability-edit branch December 17, 2018 00:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review PRs that need a code review not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants