mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2026-02-07 23:56:23 +01:00
Custom service passwords now available.
- mumble, phpbb, ipboard, jabber Addresses an evemail request.
This commit is contained in:
@@ -137,8 +137,9 @@ class IPBoardManager:
|
||||
IPBoardManager.remove_user_from_group(username, g)
|
||||
|
||||
@staticmethod
|
||||
def update_user_password(username, email):
|
||||
def update_user_password(username, email, plain_password=None):
|
||||
logger.debug("Settings new IPBoard password for user %s" % username)
|
||||
plain_password = IPBoardManager.__generate_random_pass()
|
||||
if not plain_password:
|
||||
plain_password = IPBoardManager.__generate_random_pass()
|
||||
IPBoardManager.update_user(username, email, plain_password)
|
||||
return plain_password
|
||||
|
||||
@@ -213,10 +213,11 @@ class MumbleManager:
|
||||
return False
|
||||
|
||||
@staticmethod
|
||||
def update_user_password(username):
|
||||
def update_user_password(username, password=None):
|
||||
logger.debug("Updating mumble user %s password." % username)
|
||||
dbcursor = connections['mumble'].cursor()
|
||||
password = MumbleManager.__generate_random_pass()
|
||||
if not password:
|
||||
password = MumbleManager.__generate_random_pass()
|
||||
pwhash = MumbleManager._gen_pwhash(password)
|
||||
logger.debug("Proceeding with mumble user %s password update - pwhash starts with %s" % (username, pwhash[0:5]))
|
||||
if MumbleManager.check_user_exist(username):
|
||||
|
||||
@@ -82,10 +82,11 @@ class OpenfireManager:
|
||||
logger.info("Unlocked openfire user %s" % username)
|
||||
|
||||
@staticmethod
|
||||
def update_user_pass(username):
|
||||
def update_user_pass(username, password=None):
|
||||
logger.debug("Updating openfire user %s password." % username)
|
||||
try:
|
||||
password = OpenfireManager.__generate_random_pass()
|
||||
if not password:
|
||||
password = OpenfireManager.__generate_random_pass()
|
||||
api = ofUsers(settings.OPENFIRE_ADDRESS, settings.OPENFIRE_SECRET_KEY)
|
||||
api.update_user(username, password=password)
|
||||
logger.info("Updated openfire user %s password." % username)
|
||||
|
||||
@@ -248,10 +248,11 @@ class Phpbb3Manager:
|
||||
return False
|
||||
|
||||
@staticmethod
|
||||
def update_user_password(username, characterid):
|
||||
def update_user_password(username, characterid, password=None):
|
||||
logger.debug("Updating phpbb user %s password" % username)
|
||||
cursor = connections['phpbb3'].cursor()
|
||||
password = Phpbb3Manager.__generate_random_pass()
|
||||
if not password:
|
||||
password = Phpbb3Manager.__generate_random_pass()
|
||||
if Phpbb3Manager.check_user(username):
|
||||
pwhash = Phpbb3Manager.__gen_hash(password)
|
||||
logger.debug("Proceeding to update phpbb user %s password with pwhash starting with %s" % (username, pwhash[0:5]))
|
||||
|
||||
Reference in New Issue
Block a user