Opened 7 years ago

Closed 5 years ago

Last modified 2 years ago

#3148 closed feature-request (Fixed)

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

Reported by: DjLegolas Owned by:
Priority: minor Milestone: 2.1.0
Component: Web UI Version: develop
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 (6)

comment:1 by Calum, 6 years ago

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 by DjLegolas, 6 years ago

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 by Calum, 6 years ago

Milestone: 2.02.0.0

Milestone renamed

comment:4 by Calum, 5 years ago

Milestone: 2.0.02.1.x

Ticket retargeted after milestone closed

comment:5 by int3l, 5 years ago

Resolution: Fixed
Status: newclosed

comment:6 by Calum, 2 years ago

Milestone: 2.1.x2.1.0

Milestone renamed

Note: See TracTickets for help on using tickets.