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