Sunil Mohan Adapa 4fed6921d6
actions: Add a decorator for marking superuser actions
Any privileged action (a method) can be marked as such with the new decorator. A
call to the method will be serialized into a sudo call (or later into a D-Bus
call). The method arguments are turned to JSON and method is called as
superuser. Arguments are de-serialized and are verified for type before the
actual call as superuser. Return values are serialized and returned where they
are de-serialized. Exceptions are also serialized and de-serialized.

The method must have be strictly typed and should not have keyword-only
arguments. Currently supported types are int, float, str, dict/Dict, list/List
and Optional.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-06-20 18:16:47 -04:00
..
2020-09-27 22:16:07 +05:30
2020-02-19 14:39:36 +02:00
2020-02-19 14:39:36 +02:00
2022-03-02 07:38:28 -05:00
2020-02-19 14:39:36 +02:00
i2p
2020-02-19 14:39:36 +02:00
2021-09-20 16:50:37 -04:00
2020-05-18 08:49:31 -04:00
2020-02-19 14:39:36 +02:00
2020-02-19 14:39:36 +02:00
2020-09-29 20:46:36 -04:00
2020-08-19 14:03:20 -07:00
2020-02-19 14:39:36 +02:00
2020-02-21 21:47:54 -05:00
2020-02-19 14:39:36 +02:00
2021-09-20 16:50:37 -04:00
tor
2020-05-24 08:59:55 -04:00
2021-11-21 19:10:54 -05:00