mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-16 16:00:17 +02:00
Merge remote-tracking branch 'refs/remotes/R4stl1n/master'
This commit is contained in:
commit
6e9f08520a
@ -161,7 +161,7 @@ STATIC_URL = '/static/'
|
|||||||
# Set to FALSE for alliance
|
# Set to FALSE for alliance
|
||||||
# Set to TRUE for corp
|
# Set to TRUE for corp
|
||||||
###########################
|
###########################
|
||||||
IS_CORP = 'False' == os.environ.get('AA_IS_CORP', 'True')
|
IS_CORP = 'True' == os.environ.get('AA_IS_CORP', 'True')
|
||||||
|
|
||||||
|
|
||||||
#################
|
#################
|
||||||
|
@ -211,7 +211,9 @@ def run_api_refresh():
|
|||||||
if authserviceinfo.main_char_id:
|
if authserviceinfo.main_char_id:
|
||||||
if authserviceinfo.main_char_id != "":
|
if authserviceinfo.main_char_id != "":
|
||||||
#preserve old corp ID for corp change test on members
|
#preserve old corp ID for corp change test on members
|
||||||
oldcorp_id = EveCharacter.objects.get(character_id=authserviceinfo.main_char_id).corporation_id
|
oldcorp_id = 0
|
||||||
|
if EveManager.get_character_by_id(authserviceinfo.main_char_id):
|
||||||
|
oldcorp_id = EveCharacter.objects.get(character_id=authserviceinfo.main_char_id).corporation_id
|
||||||
for api_key_pair in api_key_pairs:
|
for api_key_pair in api_key_pairs:
|
||||||
print 'Running on ' + api_key_pair.api_id + ':' + api_key_pair.api_key
|
print 'Running on ' + api_key_pair.api_id + ':' + api_key_pair.api_key
|
||||||
if EveApiManager.api_key_is_valid(api_key_pair.api_id, api_key_pair.api_key):
|
if EveApiManager.api_key_is_valid(api_key_pair.api_id, api_key_pair.api_key):
|
||||||
@ -227,59 +229,66 @@ def run_api_refresh():
|
|||||||
if valid_key:
|
if valid_key:
|
||||||
# Check our main character
|
# Check our main character
|
||||||
character = EveManager.get_character_by_id(authserviceinfo.main_char_id)
|
character = EveManager.get_character_by_id(authserviceinfo.main_char_id)
|
||||||
corp = EveManager.get_corporation_info_by_id(character.corporation_id)
|
if character is not None and EveManager.check_if_corporation_exists_by_id(character.corporation_id):
|
||||||
main_corp_id = EveManager.get_charater_corporation_id_by_id(authserviceinfo.main_char_id)
|
corp = EveManager.get_corporation_info_by_id(character.corporation_id)
|
||||||
main_alliance_id = EveManager.get_charater_alliance_id_by_id(authserviceinfo.main_char_id)
|
main_corp_id = EveManager.get_charater_corporation_id_by_id(authserviceinfo.main_char_id)
|
||||||
if (settings.IS_CORP and main_corp_id == settings.CORP_ID) or (not settings.IS_CORP and main_alliance_id == settings.ALLIANCE_ID):
|
main_alliance_id = EveManager.get_charater_alliance_id_by_id(authserviceinfo.main_char_id)
|
||||||
if not check_if_user_has_permission(user, "member"):
|
if (settings.IS_CORP and main_corp_id == settings.CORP_ID) or (not settings.IS_CORP and main_alliance_id == settings.ALLIANCE_ID):
|
||||||
#transition from none or blue to member
|
if not check_if_user_has_permission(user, "member"):
|
||||||
if check_if_user_has_permission(user, "blue_member"):
|
#transition from none or blue to member
|
||||||
#strip blue status
|
if check_if_user_has_permission(user, "blue_member"):
|
||||||
remove_member_permission(user, "blue_member")
|
#strip blue status
|
||||||
remove_user_from_group(user, settings.DEFAULT_BLUE_GROUP)
|
remove_member_permission(user, "blue_member")
|
||||||
AuthServicesInfoManager.update_is_blue(False, user)
|
remove_user_from_group(user, settings.DEFAULT_BLUE_GROUP)
|
||||||
#add to auth group
|
AuthServicesInfoManager.update_is_blue(False, user)
|
||||||
add_member_permission(user, "member")
|
#add to auth group
|
||||||
add_user_to_group(user, settings.DEFAULT_AUTH_GROUP)
|
add_member_permission(user, "member")
|
||||||
#add to required corp group
|
add_user_to_group(user, settings.DEFAULT_AUTH_GROUP)
|
||||||
add_user_to_group(user, generate_corp_group_name(character.corporation_name))
|
#add to required corp group
|
||||||
elif corp.corporation_id != oldcorp_id:
|
add_user_to_group(user, generate_corp_group_name(character.corporation_name))
|
||||||
#changed corps, both corps auth'd, need to change group assignment
|
elif corp.corporation_id != oldcorp_id:
|
||||||
oldcorp = EveCorporationInfo.objects.get(corporation_id=oldcorp_id)
|
#changed corps, both corps auth'd, need to change group assignment
|
||||||
remove_user_from_group(user, generate_corp_group_name(oldcorp.corporation_name))
|
oldcorp = EveCorporationInfo.objects.get(corporation_id=oldcorp_id)
|
||||||
add_user_to_group(user, generate_corp_group_name(character.corporation_name))
|
remove_user_from_group(user, generate_corp_group_name(oldcorp.corporation_name))
|
||||||
#reset services to force new mumble names and group assignments
|
add_user_to_group(user, generate_corp_group_name(character.corporation_name))
|
||||||
deactivate_services(user)
|
#reset services to force new mumble names and group assignments
|
||||||
elif corp is not None:
|
deactivate_services(user)
|
||||||
if corp.is_blue is not True:
|
elif corp is not None:
|
||||||
|
if corp.is_blue is not True:
|
||||||
|
if check_if_user_has_permission(user, "member"):
|
||||||
|
#transition from member to nobody
|
||||||
|
disable_alliance_member(user, authserviceinfo.main_char_id)
|
||||||
|
elif check_if_user_has_permission(user, "blue_member"):
|
||||||
|
#transition from blue to nobody
|
||||||
|
disable_blue_member(user)
|
||||||
|
else:
|
||||||
|
#stay nobody, make sure no services
|
||||||
|
deactivate_services(user)
|
||||||
|
else:
|
||||||
|
if check_if_user_has_permission(user, "member"):
|
||||||
|
#remove auth member to prepare for member to blue transition
|
||||||
|
disable_alliance_member(user, authserviceinfo.main_char_id)
|
||||||
|
if not check_if_user_has_permission(user, "blue_member"):
|
||||||
|
#perform nobody to blue transition
|
||||||
|
add_member_permission(user, "blue_member")
|
||||||
|
add_user_to_group(user, settings.DEFAULT_BLUE_GROUP)
|
||||||
|
AuthServicesInfoManager.update_is_blue(True, user)
|
||||||
|
|
||||||
|
else:
|
||||||
|
# disable accounts with missing corp model (not blue or member)
|
||||||
if check_if_user_has_permission(user, "member"):
|
if check_if_user_has_permission(user, "member"):
|
||||||
#transition from member to nobody
|
|
||||||
disable_alliance_member(user, authserviceinfo.main_char_id)
|
disable_alliance_member(user, authserviceinfo.main_char_id)
|
||||||
elif check_if_user_has_permission(user, "blue_member"):
|
elif check_if_user_has_permission(user, "blue_member"):
|
||||||
#transition from blue to nobody
|
|
||||||
disable_blue_member(user)
|
disable_blue_member(user)
|
||||||
else:
|
else:
|
||||||
#stay nobody, make sure no services
|
|
||||||
deactivate_services(user)
|
deactivate_services(user)
|
||||||
else:
|
|
||||||
if check_if_user_has_permission(user, "member"):
|
|
||||||
#remove auth member to prepare for member to blue transition
|
|
||||||
disable_alliance_member(user, authserviceinfo.main_char_id)
|
|
||||||
if not check_if_user_has_permission(user, "blue_member"):
|
|
||||||
#perform nobody to blue transition
|
|
||||||
add_member_permission(user, "blue_member")
|
|
||||||
add_user_to_group(user, settings.DEFAULT_BLUE_GROUP)
|
|
||||||
AuthServicesInfoManager.update_is_blue(True, user)
|
|
||||||
|
|
||||||
else:
|
else:
|
||||||
# disable accounts with missing corp model (not blue or member)
|
|
||||||
if check_if_user_has_permission(user, "member"):
|
if check_if_user_has_permission(user, "member"):
|
||||||
disable_alliance_member(user, authserviceinfo.main_char_id)
|
disable_alliance_member(user, authserviceinfo.main_char_id)
|
||||||
elif check_if_user_has_permission(user, "blue_member"):
|
elif check_if_user_has_permission(user, "blue_member"):
|
||||||
disable_blue_member(user)
|
disable_blue_member(user)
|
||||||
else:
|
else:
|
||||||
deactivate_services(user)
|
deactivate_services(user)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
# disable accounts with invalid keys
|
# disable accounts with invalid keys
|
||||||
if check_if_user_has_permission(user, "member"):
|
if check_if_user_has_permission(user, "member"):
|
||||||
@ -313,7 +322,7 @@ def run_corp_update():
|
|||||||
if not EveManager.check_if_alliance_exists_by_id(settings.ALLIANCE_ID):
|
if not EveManager.check_if_alliance_exists_by_id(settings.ALLIANCE_ID):
|
||||||
EveManager.create_alliance_info(settings.ALLIANCE_ID, alliance_info['name'], alliance_info['ticker'],
|
EveManager.create_alliance_info(settings.ALLIANCE_ID, alliance_info['name'], alliance_info['ticker'],
|
||||||
alliance_info['executor_id'], alliance_info['member_count'], False)
|
alliance_info['executor_id'], alliance_info['member_count'], False)
|
||||||
alliance = EveManager.get_alliance_info_by_id(settings.ALLIANCE_ID)
|
alliance = EveManager.get_alliance_info_by_id(settings.ALLIANCE_ID)
|
||||||
# Create the corps in the alliance
|
# Create the corps in the alliance
|
||||||
for alliance_corp in alliance_info['member_corps']:
|
for alliance_corp in alliance_info['member_corps']:
|
||||||
corpinfo = EveApiManager.get_corporation_information(alliance_corp)
|
corpinfo = EveApiManager.get_corporation_information(alliance_corp)
|
||||||
@ -419,7 +428,7 @@ def run_corp_update():
|
|||||||
# Remove irrelevent corp and alliance models
|
# Remove irrelevent corp and alliance models
|
||||||
# Check the corps
|
# Check the corps
|
||||||
for all_corp_info in EveManager.get_all_corporation_info():
|
for all_corp_info in EveManager.get_all_corporation_info():
|
||||||
if (settings.IS_CORP and all_corp_info.corporation_id != settings.CORP_ID) or (not settings.IS_CORP and all_corp_info.alliance_id != settings.ALLIANCE_ID):
|
if (settings.IS_CORP and all_corp_info.corporation_id != settings.CORP_ID) or (not settings.IS_CORP and all_corp_info.alliance.alliance_id != settings.ALLIANCE_ID):
|
||||||
if not all_corp_info.is_blue:
|
if not all_corp_info.is_blue:
|
||||||
all_corp_info.delete()
|
all_corp_info.delete()
|
||||||
|
|
||||||
@ -428,7 +437,3 @@ def run_corp_update():
|
|||||||
if (not settings.IS_CORP and all_alliance_info.alliance_id != settings.ALLIANCE_ID):
|
if (not settings.IS_CORP and all_alliance_info.alliance_id != settings.ALLIANCE_ID):
|
||||||
if all_alliance_info.is_blue is not True:
|
if all_alliance_info.is_blue is not True:
|
||||||
all_alliance_info.delete()
|
all_alliance_info.delete()
|
||||||
if all_alliance_info.is_blue is not True:
|
|
||||||
all_alliance_info.delete()
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,7 +2,9 @@ from django.contrib import admin
|
|||||||
|
|
||||||
from models import GroupDescription
|
from models import GroupDescription
|
||||||
from models import GroupRequest
|
from models import GroupRequest
|
||||||
|
from models import HiddenGroup
|
||||||
|
|
||||||
|
|
||||||
admin.site.register(GroupDescription)
|
admin.site.register(GroupDescription)
|
||||||
admin.site.register(GroupRequest)
|
admin.site.register(GroupRequest)
|
||||||
|
admin.site.register(HiddenGroup)
|
||||||
|
@ -21,4 +21,10 @@ class GroupRequest(models.Model):
|
|||||||
main_char = models.ForeignKey(EveCharacter)
|
main_char = models.ForeignKey(EveCharacter)
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return self.user.username + ":" + self.group.name
|
return self.user.username + ":" + self.group.name
|
||||||
|
|
||||||
|
class HiddenGroup(models.Model):
|
||||||
|
group = models.ForeignKey(Group, unique=True)
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
return self.group.name + " - Hidden"
|
||||||
|
@ -8,6 +8,7 @@ from django.contrib.auth.models import Group
|
|||||||
|
|
||||||
from models import GroupDescription
|
from models import GroupDescription
|
||||||
from models import GroupRequest
|
from models import GroupRequest
|
||||||
|
from models import HiddenGroup
|
||||||
from authentication.managers import AuthServicesInfoManager
|
from authentication.managers import AuthServicesInfoManager
|
||||||
from eveonline.managers import EveManager
|
from eveonline.managers import EveManager
|
||||||
|
|
||||||
@ -100,6 +101,8 @@ def groups_view(request):
|
|||||||
pass
|
pass
|
||||||
elif settings.DEFAULT_BLUE_GROUP in group.name:
|
elif settings.DEFAULT_BLUE_GROUP in group.name:
|
||||||
pass
|
pass
|
||||||
|
elif HiddenGroup.objects.filter(group=group).exists():
|
||||||
|
pass
|
||||||
else:
|
else:
|
||||||
# Get the descriptionn
|
# Get the descriptionn
|
||||||
groupDesc = GroupDescription.objects.filter(group=group)
|
groupDesc = GroupDescription.objects.filter(group=group)
|
||||||
|
@ -3,7 +3,7 @@ from django.contrib.auth.models import User
|
|||||||
|
|
||||||
|
|
||||||
class RegistrationForm(forms.Form):
|
class RegistrationForm(forms.Form):
|
||||||
username = forms.CharField(max_length=32, required=True)
|
username = forms.CharField(max_length=30, required=True)
|
||||||
password = forms.CharField(widget=forms.PasswordInput(), required=True)
|
password = forms.CharField(widget=forms.PasswordInput(), required=True)
|
||||||
password_again = forms.CharField(widget=forms.PasswordInput(), required=True, label="Password Again")
|
password_again = forms.CharField(widget=forms.PasswordInput(), required=True, label="Password Again")
|
||||||
email = forms.CharField(max_length=254, required=True)
|
email = forms.CharField(max_length=254, required=True)
|
||||||
@ -28,4 +28,4 @@ class RegistrationForm(forms.Form):
|
|||||||
if self.cleaned_data['email'] != self.cleaned_data['email_again']:
|
if self.cleaned_data['email'] != self.cleaned_data['email_again']:
|
||||||
raise forms.ValidationError(u'Emails do not match')
|
raise forms.ValidationError(u'Emails do not match')
|
||||||
|
|
||||||
return self.cleaned_data
|
return self.cleaned_data
|
||||||
|
@ -32,9 +32,18 @@ class Phpbb3Manager:
|
|||||||
SQL_GET_USER_GROUPS = r"SELECT phpbb_groups.group_name FROM phpbb_groups , phpbb_user_group WHERE " \
|
SQL_GET_USER_GROUPS = r"SELECT phpbb_groups.group_name FROM phpbb_groups , phpbb_user_group WHERE " \
|
||||||
r"phpbb_user_group.group_id = phpbb_groups.group_id AND user_id=%s"
|
r"phpbb_user_group.group_id = phpbb_groups.group_id AND user_id=%s"
|
||||||
|
|
||||||
|
SQL_ADD_USER_AVATAR = r"UPDATE phpbb_users SET user_avatar_type=2, user_avatar_width=64, user_avatar_height=64, user_avatar=%s WHERE user_id = %s"
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def __add_avatar(username, characterid):
|
||||||
|
avatar_url = "http://image.eveonline.com/Character/" + characterid + "_64.jpg"
|
||||||
|
cursor = connections['phpbb3'].cursor()
|
||||||
|
userid = Phpbb3Manager.__get_user_id(username)
|
||||||
|
cursor.execute(Phpbb3Manager.SQL_ADD_USER_AVATAR, [avatar_url, userid])
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def __generate_random_pass():
|
def __generate_random_pass():
|
||||||
return os.urandom(8).encode('hex')
|
return os.urandom(8).encode('hex')
|
||||||
@ -113,7 +122,7 @@ class Phpbb3Manager:
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def add_user(username, email, groups):
|
def add_user(username, email, groups, characterid):
|
||||||
cursor = connections['phpbb3'].cursor()
|
cursor = connections['phpbb3'].cursor()
|
||||||
|
|
||||||
username_clean = Phpbb3Manager.__santatize_username(username)
|
username_clean = Phpbb3Manager.__santatize_username(username)
|
||||||
@ -130,6 +139,7 @@ class Phpbb3Manager:
|
|||||||
email, 2, Phpbb3Manager.__get_current_utc_date(),
|
email, 2, Phpbb3Manager.__get_current_utc_date(),
|
||||||
"", ""])
|
"", ""])
|
||||||
Phpbb3Manager.update_groups(username_clean, groups)
|
Phpbb3Manager.update_groups(username_clean, groups)
|
||||||
|
Phpbb3Manager.__add_avatar(username_clean, characterid)
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@ -203,12 +213,13 @@ class Phpbb3Manager:
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def update_user_password(username):
|
def update_user_password(username, characterid):
|
||||||
cursor = connections['phpbb3'].cursor()
|
cursor = connections['phpbb3'].cursor()
|
||||||
password = Phpbb3Manager.__generate_random_pass()
|
password = Phpbb3Manager.__generate_random_pass()
|
||||||
if Phpbb3Manager.check_user(username):
|
if Phpbb3Manager.check_user(username):
|
||||||
pwhash = Phpbb3Manager.__gen_hash(password)
|
pwhash = Phpbb3Manager.__gen_hash(password)
|
||||||
cursor.execute(Phpbb3Manager.SQL_UPDATE_USER_PASSWORD, [pwhash, username])
|
cursor.execute(Phpbb3Manager.SQL_UPDATE_USER_PASSWORD, [pwhash, username])
|
||||||
|
Phpbb3Manager.__add_avatar(username, characterid)
|
||||||
return password
|
return password
|
||||||
|
|
||||||
return ""
|
return ""
|
||||||
@ -219,4 +230,4 @@ class Phpbb3Manager:
|
|||||||
try:
|
try:
|
||||||
cursor.execute(Phpbb3Manager.SQL_DIS_USER, [email, password, username])
|
cursor.execute(Phpbb3Manager.SQL_DIS_USER, [email, password, username])
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
@ -115,19 +115,22 @@ class Teamspeak3Manager:
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _sync_ts_group_db():
|
def _sync_ts_group_db():
|
||||||
remote_groups = Teamspeak3Manager._group_list()
|
try:
|
||||||
local_groups = TSgroup.objects.all()
|
remote_groups = Teamspeak3Manager._group_list()
|
||||||
for key in remote_groups:
|
local_groups = TSgroup.objects.all()
|
||||||
remote_groups[key] = int(remote_groups[key])
|
for key in remote_groups:
|
||||||
|
remote_groups[key] = int(remote_groups[key])
|
||||||
|
|
||||||
for group in local_groups:
|
for group in local_groups:
|
||||||
if group.ts_group_id not in remote_groups.values():
|
if group.ts_group_id not in remote_groups.values():
|
||||||
TSgroup.objects.filter(ts_group_id=group.ts_group_id).delete()
|
TSgroup.objects.filter(ts_group_id=group.ts_group_id).delete()
|
||||||
for key in remote_groups:
|
for key in remote_groups:
|
||||||
g = TSgroup(ts_group_id=remote_groups[key],ts_group_name=key)
|
g = TSgroup(ts_group_id=remote_groups[key],ts_group_name=key)
|
||||||
q = TSgroup.objects.filter(ts_group_id=g.ts_group_id)
|
q = TSgroup.objects.filter(ts_group_id=g.ts_group_id)
|
||||||
if not q:
|
if not q:
|
||||||
g.save()
|
g.save()
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def add_user(username, corp_ticker):
|
def add_user(username, corp_ticker):
|
||||||
@ -139,9 +142,9 @@ class Teamspeak3Manager:
|
|||||||
server_groups = Teamspeak3Manager._group_list()
|
server_groups = Teamspeak3Manager._group_list()
|
||||||
|
|
||||||
if not settings.DEFAULT_AUTH_GROUP in server_groups:
|
if not settings.DEFAULT_AUTH_GROUP in server_groups:
|
||||||
Teamspeak3Manager._create_group(settings.DEFAULT_ALLIANCE_GROUP)
|
Teamspeak3Manager._create_group(settings.DEFAULT_AUTH_GROUP)
|
||||||
|
|
||||||
alliance_group_id = Teamspeak3Manager._group_id_by_name(settings.DEFAULT_ALLIANCE_GROUP)
|
alliance_group_id = Teamspeak3Manager._group_id_by_name(settings.DEFAULT_AUTH_GROUP)
|
||||||
|
|
||||||
ret = server.send_command('tokenadd', {'tokentype': 0, 'tokenid1': alliance_group_id, 'tokenid2': 0,
|
ret = server.send_command('tokenadd', {'tokentype': 0, 'tokenid1': alliance_group_id, 'tokenid2': 0,
|
||||||
'tokendescription': username_clean,
|
'tokendescription': username_clean,
|
||||||
|
@ -139,11 +139,12 @@ class TS3Proto():
|
|||||||
v = [v[0], '='.join(v[1:])]
|
v = [v[0], '='.join(v[1:])]
|
||||||
key, value = v
|
key, value = v
|
||||||
keys[key] = self._unescape_str(value)
|
keys[key] = self._unescape_str(value)
|
||||||
elif v[0][0] and v[0][0] == '-':
|
elif (not v == ['']):
|
||||||
# Option
|
if v[0][0] and v[0][0] == '-':
|
||||||
opts.append(v[0][1:])
|
# Option
|
||||||
else:
|
opts.append(v[0][1:])
|
||||||
command = v[0]
|
else:
|
||||||
|
command = v[0]
|
||||||
|
|
||||||
d = {'keys': keys, 'opts': opts}
|
d = {'keys': keys, 'opts': opts}
|
||||||
if command:
|
if command:
|
||||||
@ -241,4 +242,4 @@ class TS3Server(TS3Proto):
|
|||||||
@type id: int
|
@type id: int
|
||||||
"""
|
"""
|
||||||
if self._connected and id > 0:
|
if self._connected and id > 0:
|
||||||
self.send_command('use', keys={'sid': id})
|
self.send_command('use', keys={'sid': id})
|
||||||
|
@ -100,7 +100,7 @@ def activate_forum(request):
|
|||||||
authinfo = AuthServicesInfoManager.get_auth_service_info(request.user)
|
authinfo = AuthServicesInfoManager.get_auth_service_info(request.user)
|
||||||
# Valid now we get the main characters
|
# Valid now we get the main characters
|
||||||
character = EveManager.get_character_by_id(authinfo.main_char_id)
|
character = EveManager.get_character_by_id(authinfo.main_char_id)
|
||||||
result = Phpbb3Manager.add_user(character.character_name, request.user.email, ['REGISTERED'])
|
result = Phpbb3Manager.add_user(character.character_name, request.user.email, ['REGISTERED'], authinfo.main_char_id)
|
||||||
# if empty we failed
|
# if empty we failed
|
||||||
if result[0] != "":
|
if result[0] != "":
|
||||||
AuthServicesInfoManager.update_user_forum_info(result[0], result[1], request.user)
|
AuthServicesInfoManager.update_user_forum_info(result[0], result[1], request.user)
|
||||||
@ -126,7 +126,7 @@ def deactivate_forum(request):
|
|||||||
@user_passes_test(service_blue_alliance_test)
|
@user_passes_test(service_blue_alliance_test)
|
||||||
def reset_forum_password(request):
|
def reset_forum_password(request):
|
||||||
authinfo = AuthServicesInfoManager.get_auth_service_info(request.user)
|
authinfo = AuthServicesInfoManager.get_auth_service_info(request.user)
|
||||||
result = Phpbb3Manager.update_user_password(authinfo.forum_username)
|
result = Phpbb3Manager.update_user_password(authinfo.forum_username, authinfo.main_char_id)
|
||||||
# false we failed
|
# false we failed
|
||||||
if result != "":
|
if result != "":
|
||||||
AuthServicesInfoManager.update_user_forum_info(authinfo.forum_username, result, request.user)
|
AuthServicesInfoManager.update_user_forum_info(authinfo.forum_username, result, request.user)
|
||||||
|
Binary file not shown.
@ -37,9 +37,9 @@
|
|||||||
<a class="navbar-brand ">
|
<a class="navbar-brand ">
|
||||||
<div class="fa fa-cog fa-spin"></div>
|
<div class="fa fa-cog fa-spin"></div>
|
||||||
{% if IS_CORP %}
|
{% if IS_CORP %}
|
||||||
<title>{{ CORP_NAME }}</title>
|
{{ CORP_NAME }}
|
||||||
{% else %}
|
{% else %}
|
||||||
<title>{{ ALLIANCE_NAME }}</title>
|
{{ ALLIANCE_NAME }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@ -102,7 +102,7 @@
|
|||||||
<li>
|
<li>
|
||||||
<a {% ifequal request.path "/services/" %} class="active" {% endifequal %}
|
<a {% ifequal request.path "/services/" %} class="active" {% endifequal %}
|
||||||
href="{% url 'auth_services' %}"><i
|
href="{% url 'auth_services' %}"><i
|
||||||
class="fa fa-cogs fa-fw grayiconecolor"></i>Services</a>
|
class="fa fa-cogs fa-fw grayiconecolor"></i> Services</a>
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{% load staticfiles %}
|
{% load staticfiles %}
|
||||||
<style>
|
<style>
|
||||||
html {
|
html {
|
||||||
background: url("{% static 'img/index_images/index_bg.jpg' %}") no-repeat center center fixed;
|
background: url('{% static 'img/index_images/index_blank_bg.jpg' %}') no-repeat scroll;
|
||||||
-webkit-background-size: cover;
|
-webkit-background-size: cover;
|
||||||
-moz-background-size: cover;
|
-moz-background-size: cover;
|
||||||
-o-background-size: cover;
|
-o-background-size: cover;
|
||||||
@ -17,15 +17,29 @@
|
|||||||
margin-top: -100px;
|
margin-top: -100px;
|
||||||
margin-left: -200px;
|
margin-left: -200px;
|
||||||
}
|
}
|
||||||
|
#logo {
|
||||||
|
height: 200px;
|
||||||
|
width: 900px;
|
||||||
|
position: fixed;
|
||||||
|
top: 20%;
|
||||||
|
left: 50%;
|
||||||
|
margin-top: -100px;
|
||||||
|
margin-left: -450px;
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<html>
|
<html>
|
||||||
<head lang="en">
|
<head lang="en">
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<title>The 99 Percent Eve Alliance</title>
|
<title>My Corp and/or Alliance Name</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
<div id="logo">
|
||||||
|
<p style="text-align:center">
|
||||||
|
<img src="{% static 'img/index_images/logo.png' %}" border="0">
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
<div id="content">
|
<div id="content">
|
||||||
<p style="text-align:center">
|
<p style="text-align:center">
|
||||||
<a href="/dashboard/">
|
<a href="/dashboard/">
|
||||||
@ -44,12 +58,6 @@
|
|||||||
<img src="{% static 'img/index_images/killboard.png' %}" border="0">
|
<img src="{% static 'img/index_images/killboard.png' %}" border="0">
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p style="text-align:center">
|
|
||||||
<a href="https://www.youtube.com/playlist?list=PLXM5OIn59G5Gn7eri-lWkXvE15oP5yUUk">
|
|
||||||
<img src="{% static 'img/index_images/media.png' %}" border="0">
|
|
||||||
</a>
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -23,7 +23,10 @@
|
|||||||
<style>
|
<style>
|
||||||
body {
|
body {
|
||||||
background: url('{% static 'img/index_images/index_blank_bg.jpg' %}') no-repeat scroll;
|
background: url('{% static 'img/index_images/index_blank_bg.jpg' %}') no-repeat scroll;
|
||||||
background-size: 100% 100%;
|
-webkit-background-size: cover;
|
||||||
|
-moz-background-size: cover;
|
||||||
|
-o-background-size: cover;
|
||||||
|
background-size: cover;
|
||||||
}
|
}
|
||||||
|
|
||||||
.panel-transparent {
|
.panel-transparent {
|
||||||
|
@ -24,7 +24,10 @@
|
|||||||
<style>
|
<style>
|
||||||
body {
|
body {
|
||||||
background: url('{% static 'img/index_images/index_blank_bg.jpg' %}') no-repeat scroll;
|
background: url('{% static 'img/index_images/index_blank_bg.jpg' %}') no-repeat scroll;
|
||||||
background-size: 100% 100%;
|
-webkit-background-size: cover;
|
||||||
|
-moz-background-size: cover;
|
||||||
|
-o-background-size: cover;
|
||||||
|
background-size: cover;
|
||||||
}
|
}
|
||||||
|
|
||||||
.panel-transparent {
|
.panel-transparent {
|
||||||
|
@ -25,7 +25,10 @@
|
|||||||
<style>
|
<style>
|
||||||
body {
|
body {
|
||||||
background: url('{% static 'img/index_images/index_blank_bg.jpg' %}') no-repeat scroll;
|
background: url('{% static 'img/index_images/index_blank_bg.jpg' %}') no-repeat scroll;
|
||||||
background-size: 100% 100%;
|
-webkit-background-size: cover;
|
||||||
|
-moz-background-size: cover;
|
||||||
|
-o-background-size: cover;
|
||||||
|
background-size: cover;
|
||||||
}
|
}
|
||||||
|
|
||||||
.panel-transparent {
|
.panel-transparent {
|
||||||
|
@ -24,7 +24,10 @@
|
|||||||
<style>
|
<style>
|
||||||
body {
|
body {
|
||||||
background: url('{% static 'img/index_images/index_blank_bg.jpg' %}') no-repeat scroll;
|
background: url('{% static 'img/index_images/index_blank_bg.jpg' %}') no-repeat scroll;
|
||||||
background-size: 100% 100%;
|
-webkit-background-size: cover;
|
||||||
|
-moz-background-size: cover;
|
||||||
|
-o-background-size: cover;
|
||||||
|
background-size: cover;
|
||||||
}
|
}
|
||||||
|
|
||||||
.panel-transparent {
|
.panel-transparent {
|
||||||
|
@ -21,7 +21,10 @@
|
|||||||
<style>
|
<style>
|
||||||
body {
|
body {
|
||||||
background: url('{% static 'img/index_images/index_blank_bg.jpg' %}') no-repeat scroll;
|
background: url('{% static 'img/index_images/index_blank_bg.jpg' %}') no-repeat scroll;
|
||||||
background-size: 100% 100%;
|
-webkit-background-size: cover;
|
||||||
|
-moz-background-size: cover;
|
||||||
|
-o-background-size: cover;
|
||||||
|
background-size: cover;
|
||||||
}
|
}
|
||||||
|
|
||||||
.panel-transparent {
|
.panel-transparent {
|
||||||
|
@ -25,7 +25,10 @@
|
|||||||
<style>
|
<style>
|
||||||
body {
|
body {
|
||||||
background: url('{% static 'img/index_images/index_blank_bg.jpg' %}') no-repeat scroll;
|
background: url('{% static 'img/index_images/index_blank_bg.jpg' %}') no-repeat scroll;
|
||||||
background-size: 100% 100%;
|
-webkit-background-size: cover;
|
||||||
|
-moz-background-size: cover;
|
||||||
|
-o-background-size: cover;
|
||||||
|
background-size: cover;
|
||||||
}
|
}
|
||||||
|
|
||||||
.panel-transparent {
|
.panel-transparent {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user