Discussion:
[Deluge] #3148: [WebUI] Get connect user's auth level and name
Deluge
2017-12-23 18:08:54 UTC
Permalink
#3148: [WebUI] Get connect user's auth level and name
-----------------------------+---------------------------
Reporter: DjLegolas | Owner:
Type: feature-request | Status: new
Priority: minor | Milestone: 2.0
Component: Web UI | Version: develop (git)
Keywords: |
-----------------------------+---------------------------
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 [http://git.deluge-
torrent.org/deluge/tree/deluge/plugins/AutoAdd/deluge/plugins/autoadd/gtkui.py?h=develop#n216
GtkUI] calls the client's [http://git.deluge-
torrent.org/deluge/tree/deluge/ui/client.py?h=develop#n767 get_auth_level]
function, but there is no such function available for the WebUI.

So, I thought to add this function, and perhaps [http://git.deluge-
torrent.org/deluge/tree/deluge/ui/client.py?h=develop#n758 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?

--
Ticket URL: <http://dev.deluge-torrent.org/ticket/3148>
Deluge <http://deluge-torrent.org/>
Deluge Project
--
You received this message because you are subscribed to the Google Groups "Deluge Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to deluge-dev+***@googlegroups.com.
To post to this group, send email to deluge-***@googlegroups.com.
Visit this group at https://groups.google.com/group/deluge-dev.
For more options, visit https://groups.google.com/d/optout.
Deluge
2018-06-14 15:06:20 UTC
Permalink
#3148: [WebUI] Get connect user's auth level and name
------------------------------+---------------------------
Reporter: DjLegolas | Owner:
Type: feature-request | Status: new
Priority: minor | Milestone: 2.0
Component: Web UI | Version: develop (git)
Resolution: | Keywords:
------------------------------+---------------------------

Comment (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()
}}}

--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3148#comment:1>
Deluge <http://deluge-torrent.org/>
Deluge Project
--
You received this message because you are subscribed to the Google Groups "Deluge Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to deluge-dev+***@googlegroups.com.
To post to this group, send email to deluge-***@googlegroups.com.
Visit this group at https://groups.google.com/group/deluge-dev.
For more options, visit https://groups.google.com/d/optout.
Deluge
2018-06-15 16:59:41 UTC
Permalink
#3148: [WebUI] Get connect user's auth level and name
------------------------------+---------------------------
Reporter: DjLegolas | Owner:
Type: feature-request | Status: new
Priority: minor | Milestone: 2.0
Component: Web UI | Version: develop (git)
Resolution: | Keywords:
------------------------------+---------------------------

Comment (by DjLegolas):

hmm, interesting.[[BR]]
Ok, added it directly to AutoAdd plugin as you suggested and works like
charm.[[BR]][[BR]]
you can close this if you want, as this can still be useful.

--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3148#comment:2>
Deluge <http://deluge-torrent.org/>
Deluge Project
--
You received this message because you are subscribed to the Google Groups "Deluge Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to deluge-dev+***@googlegroups.com.
To post to this group, send email to deluge-***@googlegroups.com.
Visit this group at https://groups.google.com/group/deluge-dev.
For more options, visit https://groups.google.com/d/optout.
Loading...