コード例 #1
0
 def login(self, username, password):
     """ This function that takes in the username
         and password and returns a session string if they are correct. It raises a
         rhnFault if the user/pass combo is not acceptable.
     """
     log_debug(5, username)
     user = rhnUser.search(username)
     if not user or not user.check_password(password):
         raise rhnFault(2)
     if rhnUser.is_user_read_only(user.username):
         raise rhnFault(702)
     session = user.create_session()
     return session.get_session()
コード例 #2
0
ファイル: packages.py プロジェクト: jdobes/spacewalk
 def login(self, username, password):
     """ This function that takes in the username
         and password and returns a session string if they are correct. It raises a
         rhnFault if the user/pass combo is not acceptable.
     """
     log_debug(5, username)
     user = rhnUser.search(username)
     if not user or not user.check_password(password):
         raise rhnFault(2)
     if rhnUser.is_user_read_only(user.username):
         raise rhnFault(702)
     session = user.create_session()
     return session.get_session()
コード例 #3
0
ファイル: packages.py プロジェクト: m47ik/uyuni
 def login(self, username, password):
     """ This function that takes in the username
         and password and returns a session string if they are correct. It raises a
         rhnFault if the user/pass combo is not acceptable.
     """
     log_debug(5, username)
     user = rhnUser.search(username)
     if not user or not user.check_password(password):
         raise rhnFault(2)
     if rhnUser.is_user_disabled(username):
         msg = _("""
                %s Account has been deactivated on this server.
                Please contact your Org administrator for more help.""")
         raise rhnFault(1, msg % username, explain=0)
     if rhnUser.is_user_read_only(user.username):
         raise rhnFault(702)
     session = user.create_session()
     return session.get_session()
コード例 #4
0
ファイル: packages.py プロジェクト: ncounter/uyuni
 def login(self, username, password):
     """ This function that takes in the username
         and password and returns a session string if they are correct. It raises a
         rhnFault if the user/pass combo is not acceptable.
     """
     log_debug(5, username)
     user = rhnUser.search(username)
     if not user or not user.check_password(password):
         raise rhnFault(2)
     if rhnUser.is_user_disabled(username):
         msg = _("""
                %s Account has been deactivated on this server.
                Please contact your Org administrator for more help.""")
         raise rhnFault(1, msg % username, explain=0)
     if rhnUser.is_user_read_only(user.username):
         raise rhnFault(702)
     session = user.create_session()
     return session.get_session()