# Path: elbepack/daemons/soap/faults.py
# class SoapElbeNotLoggedIn(Fault):
#     def __init__(self):
#         Fault.__init__(
#             self,
#             faultcode="ElbeNotLoggedIn",
#             faultstring="Not authenticated ! "
#                         "Cant let you perform this command.")
# 
# class SoapElbeNotAuthorized(Fault):
#     def __init__(self):
#         Fault.__init__(
#             self,
#             faultcode="ElbeNotAuthorized",
#             faultstring="Not Authorized ! Cant let you perform this command.")


from functools import wraps
from .faults import SoapElbeNotLoggedIn, SoapElbeNotAuthorized
        return wrapped
    if func.__code__.co_argcount == 4:
        @wraps(func)
        def wrapped(self, arg1, arg2):
            s = self.transport.req_env['beaker.session']
            try:
                uid = s['userid']
            except KeyError:
                raise SoapElbeNotLoggedIn()

            return func(self, uid, arg1, arg2)
        return wrapped
    if func.__code__.co_argcount == 5:
        @wraps(func)
        def wrapped(self, arg1, arg2, arg3):
            s = self.transport.req_env['beaker.session']
            try:
                uid = s['userid']
            except KeyError:
                raise SoapElbeNotLoggedIn()

            return func(self, uid, arg1, arg2, arg3)
        return wrapped
    if func.__code__.co_argcount == 6:
        @wraps(func)
        def wrapped(self, arg1, arg2, arg3, arg4):
            s = self.transport.req_env['beaker.session']
            try:
                uid = s['userid']
            except KeyError:

# Path: elbepack/daemons/soap/faults.py
# class SoapElbeNotLoggedIn(Fault):
#     def __init__(self):
#         Fault.__init__(
#             self,
#             faultcode="ElbeNotLoggedIn",
#             faultstring="Not authenticated ! "
#                         "Cant let you perform this command.")
# 
# class SoapElbeNotAuthorized(Fault):
#     def __init__(self):
#         Fault.__init__(
#             self,
#             faultcode="ElbeNotAuthorized",
#             faultstring="Not Authorized ! Cant let you perform this command.")


# Path: elbepack/daemons/soap/authentication.py
from functools import wraps
from .faults import SoapElbeNotLoggedIn, SoapElbeNotAuthorized

        return wrapped
    if func.__code__.co_argcount == 4:
        @wraps(func)
        def wrapped(self, arg1, arg2):
            s = self.transport.req_env['beaker.session']
            try:
                uid = s['userid']
            except KeyError:
                raise SoapElbeNotLoggedIn()

            return func(self, uid, arg1, arg2)
        return wrapped
    if func.__code__.co_argcount == 5:
        @wraps(func)
        def wrapped(self, arg1, arg2, arg3):
            s = self.transport.req_env['beaker.session']
            try:
                uid = s['userid']
            except KeyError:
                raise SoapElbeNotLoggedIn()

            return func(self, uid, arg1, arg2, arg3)
        return wrapped
    if func.__code__.co_argcount == 6:
        @wraps(func)
        def wrapped(self, arg1, arg2, arg3, arg4):
            s = self.transport.req_env['beaker.session']
            try:
                uid = s['userid']
            except KeyError:

                raise SoapElbeNotLoggedIn()