mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-11 21:40:17 +02:00
Merge branch 'master' of https://github.com/R4stl1n/allianceauth
This commit is contained in:
commit
43eeee503f
@ -40,6 +40,7 @@ def login_user(request):
|
|||||||
|
|
||||||
def logout_user(request):
|
def logout_user(request):
|
||||||
logger.debug("logout_user called by user %s" % request.user)
|
logger.debug("logout_user called by user %s" % request.user)
|
||||||
|
logoutUser = request.user
|
||||||
logout(request)
|
logout(request)
|
||||||
logger.info("Successful logout for user %s" % request.user)
|
logger.info("Successful logout for user %s" % logoutUser)
|
||||||
return HttpResponseRedirect("/")
|
return HttpResponseRedirect("/")
|
||||||
|
@ -490,8 +490,6 @@ def run_api_refresh():
|
|||||||
logger.info("User %s main character id %s missing model. Clearning main character." % (user, authserviceinfo.main_char_id))
|
logger.info("User %s main character id %s missing model. Clearning main character." % (user, authserviceinfo.main_char_id))
|
||||||
authserviceinfo.main_char_id = ''
|
authserviceinfo.main_char_id = ''
|
||||||
authserviceinfo.save()
|
authserviceinfo.save()
|
||||||
else:
|
|
||||||
logger.warn("User %s has no main character id, unable to validate membership.")
|
|
||||||
set_state(user)
|
set_state(user)
|
||||||
|
|
||||||
|
|
||||||
|
@ -287,11 +287,11 @@ class EveApiManager():
|
|||||||
def validate_member_api(api_id, api_key):
|
def validate_member_api(api_id, api_key):
|
||||||
if settings.MEMBER_API_ACCOUNT:
|
if settings.MEMBER_API_ACCOUNT:
|
||||||
if EveApiManager.check_api_is_type_account(api_id, api_key) is not True:
|
if EveApiManager.check_api_is_type_account(api_id, api_key) is not True:
|
||||||
logger.debug("Api id %s is not type account as required for members - failed validation." % api_id)
|
logger.info("Api id %s is not type account as required for members - failed validation." % api_id)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
if EveApiManager.check_api_is_full(api_id, api_key) is not True:
|
if EveApiManager.check_api_is_full(api_id, api_key) is not True:
|
||||||
logger.debug("Api id %s does not meet member access mask requirements - failed validation." % api_id)
|
logger.info("Api id %s does not meet member access mask requirements - failed validation." % api_id)
|
||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
|
|
||||||
@ -299,9 +299,9 @@ class EveApiManager():
|
|||||||
def validate_blue_api(api_id, api_key):
|
def validate_blue_api(api_id, api_key):
|
||||||
if settings.BLUE_API_ACCOUNT:
|
if settings.BLUE_API_ACCOUNT:
|
||||||
if EveApiManager.check_api_is_type_account(api_id, api_key) is not True:
|
if EveApiManager.check_api_is_type_account(api_id, api_key) is not True:
|
||||||
logger.debug("Api id %s is not type account as required for blues - failed validation." % api_id)
|
logger.info("Api id %s is not type account as required for blues - failed validation." % api_id)
|
||||||
return False
|
return False
|
||||||
if EveApiManager.check_blue_api_is_full(api_id, api_key) is not True:
|
if EveApiManager.check_blue_api_is_full(api_id, api_key) is not True:
|
||||||
logger.debug("Api id %s does not meet minimum blue access mask requirements - failed validation." % api_id)
|
logger.info("Api id %s does not meet minimum blue access mask requirements - failed validation." % api_id)
|
||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
|
@ -47,7 +47,7 @@ class Phpbb3Manager:
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def __add_avatar(username, characterid):
|
def __add_avatar(username, characterid):
|
||||||
logger.debug("Adding EVE character id %s portrait as phpbb avater for user %s" % (characterid, username))
|
logger.debug("Adding EVE character id %s portrait as phpbb avater for user %s" % (characterid, username))
|
||||||
avatar_url = "http://image.eveonline.com/Character/" + characterid + "_64.jpg"
|
avatar_url = "https://image.eveonline.com/Character/" + characterid + "_64.jpg"
|
||||||
cursor = connections['phpbb3'].cursor()
|
cursor = connections['phpbb3'].cursor()
|
||||||
userid = Phpbb3Manager.__get_user_id(username)
|
userid = Phpbb3Manager.__get_user_id(username)
|
||||||
cursor.execute(Phpbb3Manager.SQL_ADD_USER_AVATAR, [avatar_url, userid])
|
cursor.execute(Phpbb3Manager.SQL_ADD_USER_AVATAR, [avatar_url, userid])
|
||||||
|
@ -279,13 +279,11 @@ class Teamspeak3Manager:
|
|||||||
if user_ts_groups[user_ts_group_key] not in ts_groups.values():
|
if user_ts_groups[user_ts_group_key] not in ts_groups.values():
|
||||||
remgroups.append(user_ts_groups[user_ts_group_key])
|
remgroups.append(user_ts_groups[user_ts_group_key])
|
||||||
|
|
||||||
logger.info("Finished checking user id %s TS3 groups - adding %s, removing %s." % (userid, addgroups, remgroups))
|
|
||||||
|
|
||||||
for g in addgroups:
|
for g in addgroups:
|
||||||
logger.debug("Issuing add command for group %s" % g)
|
logger.info("Adding Teamspeak user %s into group %s" % (userid, g))
|
||||||
Teamspeak3Manager._add_user_to_group(userid, g)
|
Teamspeak3Manager._add_user_to_group(userid, g)
|
||||||
|
|
||||||
for g in remgroups:
|
for g in remgroups:
|
||||||
logger.debug("Issuing remove command for group %s" % g)
|
logger.info("Removing Teamspeak user %s from group %s" % (userid, g))
|
||||||
Teamspeak3Manager._remove_user_from_group(userid, g)
|
Teamspeak3Manager._remove_user_from_group(userid, g)
|
||||||
|
|
||||||
|
@ -5,8 +5,12 @@ from django.core.validators import MaxValueValidator, MinValueValidator
|
|||||||
|
|
||||||
class SignatureForm(forms.Form):
|
class SignatureForm(forms.Form):
|
||||||
sigtype = [('Wormhole', 'Wormhole'), ('Combat', 'Combat'), ('Data', 'Data'),
|
sigtype = [('Wormhole', 'Wormhole'), ('Combat', 'Combat'), ('Data', 'Data'),
|
||||||
('Relic', 'Relic')]
|
('Relic', 'Relic'), ('Gas', 'Gas'), ('Ore', 'Ore')]
|
||||||
status = [('Open', 'Open'), ('Started', 'Started'), ('Finished', 'Finished')]
|
status = [('Open', 'Open'), ('Started', 'Started'), ('Finished', 'Finished'), ('Life cycle has not begun', 'Life cycle has not begun'),
|
||||||
|
('Probably wont last another day', 'Probably wont last another day'), ('End of its natural lifetime', 'End of its natural lifetime'),
|
||||||
|
('stability not significantly disrupted', 'stability not significantly disrupted'),
|
||||||
|
('Stability reduced not critical degree yet', 'Stability reduced not critical degree yet'),
|
||||||
|
('Wormhole stability critically disrupted', 'Wormhole stability critically disrupted')]
|
||||||
|
|
||||||
system = forms.CharField(max_length=254, required=True, label='System')
|
system = forms.CharField(max_length=254, required=True, label='System')
|
||||||
ident = forms.CharField(max_length=254, required=True, label="ID")
|
ident = forms.CharField(max_length=254, required=True, label="ID")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user