Opened 6 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 Changed 6 years 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 6 years 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 6 years ago by Cas

  • Milestone changed from 2.0 to 2.0.0

Milestone renamed

comment:4 Changed 5 years ago by Cas

  • Milestone changed from 2.0.0 to 2.1.x

Ticket retargeted after milestone closed

comment:5 Changed 5 years ago by int3l

  • Resolution set to Fixed
  • Status changed from new to closed

comment:6 Changed 2 years ago by Cas

  • Milestone changed from 2.1.x to 2.1.0

Milestone renamed

Note: See TracTickets for help on using tickets.