Skip to content

Allow external actions to users list#10592

Merged
rullzer merged 1 commit into
masterfrom
allow-external-actions-userslist
Aug 13, 2018
Merged

Allow external actions to users list#10592
rullzer merged 1 commit into
masterfrom
allow-external-actions-userslist

Conversation

@skjnldsv

@skjnldsv skjnldsv commented Aug 8, 2018

Copy link
Copy Markdown
Member

@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

@skjnldsv skjnldsv added this to the Nextcloud 14 milestone Aug 8, 2018
@skjnldsv skjnldsv self-assigned this Aug 8, 2018
@skjnldsv skjnldsv requested review from blizzz and juliusknorr August 8, 2018 17:19
@skjnldsv skjnldsv force-pushed the allow-external-actions-userslist branch from 17d7080 to 9a4a956 Compare August 8, 2018 17:24
@blizzz

blizzz commented Aug 9, 2018

Copy link
Copy Markdown
Member

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

skjnldsv commented Aug 9, 2018

Copy link
Copy Markdown
Member Author

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

@blizzz

blizzz commented Aug 9, 2018

Copy link
Copy Markdown
Member

@skjnldsv that does the trick! thx.

@blizzz blizzz left a comment

Copy link
Copy Markdown
Member

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

rullzer commented Aug 9, 2018

Copy link
Copy Markdown
Member

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

@juliusknorr

juliusknorr commented Aug 10, 2018

Copy link
Copy Markdown
Member

@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

rullzer commented Aug 10, 2018

Copy link
Copy Markdown
Member

Rebase needed

@blizzz

blizzz commented Aug 10, 2018

Copy link
Copy Markdown
Member

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

@blizzz

blizzz commented Aug 13, 2018

Copy link
Copy Markdown
Member

@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
Copy Markdown
Member Author

@blizzz @rullzer done

@rullzer rullzer left a comment

Copy link
Copy Markdown
Member

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