Opened 16 months ago

Last modified 7 months ago

#3148 new feature-request

[WebUI] Get connect user's auth level and name

Reported by: DjLegolas Owned by:
Priority: minor Milestone: 2.0.0
Component: Web UI Version: develop (git)
Keywords: Cc:

Description

I saw that there are plugins that enables functionality depending on the auth level of the connected user. But, there is no way for a plugin with a webui interface to get the auth level.

For example, in the AutoAdd? plugin, the GtkUI calls the client's get_auth_level function, but there is no such function available for the WebUI.

So, I thought to add this function, and perhaps get_auth_user too.

Any way to add this support without the need to change the WebUI code itself? And if not, where is the best place to put the code in?

Change History (3)

comment:1 Changed 11 months ago by Cas

It might be useful to have exported core methods but you can export custom methods in the autoadd plugin core, the auth level lookup is actually in that code already, directly from rpcserver:

        rpcserver = component.get('RPCServer')
        session_user = rpcserver.get_session_user()
        session_auth_level = rpcserver.get_session_auth_level()

comment:2 Changed 10 months ago by DjLegolas

hmm, interesting.
Ok, added it directly to AutoAdd? plugin as you suggested and works like charm.

you can close this if you want, as this can still be useful.

comment:3 Changed 7 months ago by Cas

  • Milestone changed from 2.0 to 2.0.0

Milestone renamed

Note: See TracTickets for help on using tickets.