# Plugin development for dashboard

**URL:** <https://discuss.elastic.co/t/plugin-development-for-dashboard/209698>\
**Category:** Kibana\
**Created:** [November 27, 2019, 2:14pm UTC](https://discuss.elastic.co/t/plugin-development-for-dashboard/209698 "2019-11-27T14:14:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ultimatezio](https://avatars.discourse-cdn.com/v4/letter/u/f07891/32.png) [@ultimatezio](https://discuss.elastic.co/u/ultimatezio)\
**Post date:** [November 27, 2019, 2:14pm UTC](https://discuss.elastic.co/t/plugin-development-for-dashboard/209698/1 "2019-11-27T14:14:31Z")

</div>

Hi all,  
I'm trying to develop a kibana's plugin.  
My goal is that every time a user access a dashboard, the kibana's server log a users credential (username only) and the dashboard name.  
I have an idea of what to make server-side but I don't have any as to how I could get the user credential and the dashboard name from the front.  
I'm having trouble finding if I should use any uiExports (like hacks one) even though I will not have any UI related code.

If anyone have an idea of where should I be looking for I'll be grateful 🙂

Thanks again.

---

<div class="post-metadata">

**Author:** ![matw](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/matw/32/13913_2.png) [@matw](https://discuss.elastic.co/u/matw)\
**Post date:** [November 28, 2019, 12:41pm UTC](https://discuss.elastic.co/t/plugin-development-for-dashboard/209698/2 "2019-11-28T12:41:36Z")

</div>

Here's how you can get the current user in Kibana UI, take a look into the getCurrent method

> <https://github.com/elastic/kibana/blob/master/x-pack/legacy/plugins/security/public/services/shield_user.js>

There is one way how you can find out which user is requesting which dashboard, it's when you enable audit logs:

[https://www.elastic.co/guide/en/kibana/master/xpack-security-audit-logging.html#\_audit\_event\_types](https://www.elastic.co/guide/en/kibana/master/xpack-security-audit-logging.html#_audit_event_types)

This generates a log when user A accessed saved object B, which would be a Dashboard in this case

could that help in your case?

---

<div class="post-metadata">

**Author:** ![ultimatezio](https://avatars.discourse-cdn.com/v4/letter/u/f07891/32.png) [@ultimatezio](https://discuss.elastic.co/u/ultimatezio)\
**Post date:** [November 28, 2019, 1:05pm UTC](https://discuss.elastic.co/t/plugin-development-for-dashboard/209698/3 "2019-11-28T13:05:12Z")

</div>

I'll look into it, thanks for the informations 🙂

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 26, 2019, 1:05pm UTC](https://discuss.elastic.co/t/plugin-development-for-dashboard/209698/4 "2019-12-26T13:05:12Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
