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

Allow external actions to users list #10592

Merged
merged 1 commit into from
Aug 13, 2018
Merged

Conversation

skjnldsv
Copy link
Member

@skjnldsv skjnldsv commented Aug 8, 2018

@juliushaertl thoughts?

OCA.Settings.UserList.registerAction('icon-edit','Log event',console.log)
OCA.Settings.UserList.registerAction('icon-edit','Log userID', event => {console.log(event.target.closest('.row').dataset.id)})

Fix #10571

@blizzz
Copy link
Member

blizzz commented Aug 9, 2018

That's great, yet I am having difficulties to get the user id from an external app. Suggestions? this inside the function is bound to the window object.

@skjnldsv
Copy link
Member Author

skjnldsv commented Aug 9, 2018

@blizzz event.target.closest('.row').dataset.id
The event is passed into the function :)

@blizzz
Copy link
Member

blizzz commented Aug 9, 2018

@skjnldsv that does the trick! thx.

Copy link
Member

@blizzz blizzz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good from my PoV, and satisfies the needs for impersonate

@skjnldsv skjnldsv added 4. to release Ready to be released and/or waiting for tests to finish and removed 2. developing Work in progress 3. to review Waiting for reviews labels Aug 9, 2018
@skjnldsv skjnldsv requested a review from rullzer August 9, 2018 10:52
@rullzer rullzer mentioned this pull request Aug 9, 2018
45 tasks
@rullzer
Copy link
Member

rullzer commented Aug 9, 2018

While ok from my point of view. I'd like @juliushaertl to have a look as his javascript fu is superior to mine ;)

@juliushaertl
Copy link
Member

juliushaertl commented Aug 10, 2018

@blizzz Are there any cases where those actions should not be added, like for the current user? Because right now there is no way to exclude certain entries from adding the additional popovermenu entry. Otherwise 👍

@rullzer
Copy link
Member

rullzer commented Aug 10, 2018

Rebase needed

@blizzz
Copy link
Member

blizzz commented Aug 10, 2018

@juliushaertl yeah, for the current user it does not make sense to add it. But that one does not have the menu anyway.

@blizzz
Copy link
Member

blizzz commented Aug 13, 2018

@skjnldsv could ya rebase?

+ Created fix

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
@skjnldsv skjnldsv force-pushed the allow-external-actions-userslist branch from dcc3db4 to b9a24bf Compare August 13, 2018 09:34
@skjnldsv
Copy link
Member Author

@blizzz @rullzer done

Copy link
Member

@rullzer rullzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then lets do this 🐘

@rullzer rullzer merged commit 7ba5723 into master Aug 13, 2018
@rullzer rullzer deleted the allow-external-actions-userslist branch August 13, 2018 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. to release Ready to be released and/or waiting for tests to finish enhancement feature: users and groups feature: vue apps
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The userRow in User Management needs a way to register menu entries
4 participants