From a3de13f0555d30cd7791cba343038135917788d7 Mon Sep 17 00:00:00 2001 From: Adarnof Date: Sat, 31 Oct 2015 17:35:00 -0400 Subject: [PATCH 1/2] cleaned up settings descriptions incorporated alliance/corp check into main character change restored alliance text to forms returned optional alliance checking to periodic tasks (pray for me) deleted accidental inclusion of PID file this is gonna tickle. Signed-off-by: Adarnof --- alliance_auth/settings.py.example | 33 +++++++------ celerybeat.pid | 1 - celerytask/tasks.py | 81 ++++++++++++++++++++++--------- eveonline/forms.py | 2 +- eveonline/views.py | 2 +- 5 files changed, 76 insertions(+), 43 deletions(-) delete mode 100644 celerybeat.pid diff --git a/alliance_auth/settings.py.example b/alliance_auth/settings.py.example index 9d26f81b..9c7a6a2c 100755 --- a/alliance_auth/settings.py.example +++ b/alliance_auth/settings.py.example @@ -20,6 +20,7 @@ BASE_DIR = os.path.dirname(os.path.dirname(__file__)) # See https://docs.djangoproject.com/en/1.6/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! +# Generate a new key here: http://www.miniwebtool.com/django-secret-key-generator/ SECRET_KEY = os.environ.get('AA_SECRET_KEY', '5xvh4e0x&@-$6(kj%4^80pdo1n5v-!mtx(e(1tw@kn-1le*ts@') # SECURITY WARNING: don't run with debug turned on in production! @@ -166,7 +167,7 @@ IS_CORP = 'False' == os.environ.get('AA_IS_CORP', 'True') # DOMAIN - The alliance auth domain_url # EMAIL_HOST - SMTP Server URL # EMAIL_PORT - SMTP Server PORT -# EMAIL_HOST_USER - Email Username +# EMAIL_HOST_USER - Email Username (for gmail, the part before @gmail.com) # EMAIL_HOST_PASSWORD - Email Password # EMAIL_USE_TLS - Set to use TLS encryption ################# @@ -203,11 +204,13 @@ ENABLE_AUTH_TEAMSPEAK3 = 'True' == os.environ.get('AA_ENABLE_AUTH_TEAMSPEAK3', ' ##################### # Blue service Setup ##################### +# BLUE_STANDING - The default lowest standings setting to consider blue # ENABLE_BLUE_FORUM - Enable forum support in the auth for blues # ENABLE_BLUE_JABBER - Enable jabber support in the auth for blues # ENABLE_BLUE_MUMBLE - Enable mumble support in the auth for blues # ENABLE_BLUE_IPBOARD - Enable IPBoard forum support in the auth for blues ##################### +BLUE_STANDING = float(os.environ.get('AA_BLUE_STANDING', '5.0')) ENABLE_BLUE_FORUM = 'True' == os.environ.get('AA_ENABLE_BLUE_FORUM', 'False') ENABLE_BLUE_JABBER = 'True' == os.environ.get('AA_ENABLE_BLUE_JABBER', 'False') ENABLE_BLUE_MUMBLE = 'True' == os.environ.get('AA_ENABLE_BLUE_MUMBLE', 'True') @@ -217,26 +220,23 @@ ENABLE_BLUE_TEAMSPEAK3 = 'True' == os.environ.get('AA_ENABLE_BLUE_TEAMSPEAK3', ' ######################### # Corp Configuration ######################### +# If running in alliance mode, the following should be for the executor corp# # CORP_ID - Set this to your corp ID (get this from https://zkillboard.com/corporation/#######) # CORP_NAME - Set this to your Corporation Name # CORP_API_ID - Set this to the api id for the corp API key # CORP_API_VCODE - Set this to the api vcode for the corp API key -# BLUE_STANDING - The default lowest standings setting to consider blue ######################## CORP_ID = os.environ.get('AA_CORP_ID', '') CORP_NAME = os.environ.get('AA_CORP_NAME', '') CORP_API_ID = os.environ.get('AA_CORP_API_ID', '') CORP_API_VCODE = os.environ.get('AA_CORP_API_VCODE', '') -BLUE_STANDING = float(os.environ.get('AA_BLUE_STANDING', '5.0')) + ######################### # Alliance Configuration ######################### -# ALLIANCE_ID - Set this to your corp ID (get this from https://zkillboard.com/corporation/#######) -# ALLIANCE_NAME - Set this to your Corporation Name -# ALLIANCE_API_ID - Set this to the api id for the corp API key -# ALLIANCE_API_VCODE - Set this to the api vcode for the corp API key -# BLUE_STANDING - The default lowest standings setting to consider blue +# ALLIANCE_ID - Set this to your Alliance ID (get this from https://zkillboard.com/alliance/#######) +# ALLIANCE_NAME - Set this to your Alliance Name ######################## ALLIANCE_ID = os.environ.get('AA_ALLIANCE_ID', '') ALLIANCE_NAME = os.environ.get('AA_ALLIANCE_NAME', '') @@ -258,7 +258,7 @@ JACK_KNIFE_URL = os.environ.get('AA_JACK_KNIFE_URL', 'http://ridetheclown.com/ev # IPBOARD_APIKEY - Api key to interact with ipboard # IPBOARD_APIMODULE - Module for alliance auth *leave alone* ##################### -FORUM_URL = os.environ.get('AA_FORUM_URL', "") +FORUM_URL = os.environ.get('AA_FORUM_URL', "http://someurl.com") IPBOARD_ENDPOINT = os.environ.get('AA_IPBOARD_ENDPOINT', 'someaddress.com/interface/board/index.php') IPBOARD_APIKEY = os.environ.get('AA_IPBOARD_APIKEY', 'somekeyhere') IPBOARD_APIMODULE = 'aa' @@ -269,15 +269,16 @@ IPBOARD_APIMODULE = 'aa' # JABBER_URL - Jabber address url # JABBER_PORT - Jabber service portal # JABBER_SERVER - Jabber server url -# OPENFIRE_ADDRESS - Address of the openfire admin console -# OPENFIRE_SECRET_KEY - Openfire userservice secret key +# OPENFIRE_ADDRESS - Address of the openfire admin console including port +# Please use http with 9090 or https with 9091 +# OPENFIRE_SECRET_KEY - Openfire REST API secret key # BROADCAST_USER - Broadcast user JID # BROADCAST_USER_PASSWORD - Broadcast user password ###################### -JABBER_URL = os.environ.get('AA_JABBER_URL', "") +JABBER_URL = os.environ.get('AA_JABBER_URL', "someurl.com") JABBER_PORT = int(os.environ.get('AA_JABBER_PORT', '5223')) -JABBER_SERVER = os.environ.get('AA_JABBER_SERVER', "") -OPENFIRE_ADDRESS = os.environ.get('AA_OPENFIRE_ADDRESS', "") +JABBER_SERVER = os.environ.get('AA_JABBER_SERVER', "someurl.com") +OPENFIRE_ADDRESS = os.environ.get('AA_OPENFIRE_ADDRESS', "http://someurl.com:9090") OPENFIRE_SECRET_KEY = os.environ.get('AA_OPENFIRE_SECRET_KEY', "somekey") BROADCAST_USER = os.environ.get('AA_BROADCAST_USER', "broadcast@") + JABBER_URL BROADCAST_USER_PASSWORD = os.environ.get('AA_BROADCAST_USER_PASSWORD', "somepassword") @@ -288,7 +289,7 @@ BROADCAST_USER_PASSWORD = os.environ.get('AA_BROADCAST_USER_PASSWORD', "somepass # MUMBLE_URL - Mumble server url # MUMBLE_SERVER_ID - Mumble server id ###################################### -MUMBLE_URL = os.environ.get('AA_MUMBLE_URL', "") +MUMBLE_URL = os.environ.get('AA_MUMBLE_URL', "someurl.com") MUMBLE_SERVER_ID = int(os.environ.get('AA_MUMBLE_SERVER_ID', '1')) ###################################### @@ -302,7 +303,7 @@ MUMBLE_SERVER_ID = int(os.environ.get('AA_MUMBLE_SERVER_ID', '1')) # TEAMSPEAK3_AUTHED_GROUP_ID - Default authed group id # TEAMSPEAK3_PUBLIC_URL - teamspeak3 public url used for link creation ###################################### -TEAMSPEAK3_SERVER_IP = os.environ.get('AA_TEAMSPEAK3_SERVER_IP', '') +TEAMSPEAK3_SERVER_IP = os.environ.get('AA_TEAMSPEAK3_SERVER_IP', '127.0.0.1') TEAMSPEAK3_SERVER_PORT = int(os.environ.get('AA_TEAMSPEAK3_SERVER_PORT', '10011')) TEAMSPEAK3_SERVERQUERY_USER = os.environ.get('AA_TEAMSPEAK3_SERVERQUERY_USER', 'serveradmin') TEAMSPEAK3_SERVERQUERY_PASSWORD = os.environ.get('AA_TEAMSPEAK3_SERVERQUERY_PASSWORD', 'passwordhere') diff --git a/celerybeat.pid b/celerybeat.pid deleted file mode 100644 index 7160aec0..00000000 --- a/celerybeat.pid +++ /dev/null @@ -1 +0,0 @@ -28392 diff --git a/celerytask/tasks.py b/celerytask/tasks.py index 38b9ae09..b2b38e36 100755 --- a/celerytask/tasks.py +++ b/celerytask/tasks.py @@ -225,7 +225,8 @@ def run_api_refresh(): character = EveManager.get_character_by_id(authserviceinfo.main_char_id) corp = EveManager.get_corporation_info_by_id(character.corporation_id) main_corp_id = EveManager.get_charater_corporation_id_by_id(authserviceinfo.main_char_id) - if main_corp_id == settings.CORP_ID: + main_alliance_id = EveManager.get_charater_alliance_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): if not check_if_user_has_permission(user, "member"): #transition from blue to member if check_if_user_has_permission(user, "blue_member"): @@ -237,29 +238,38 @@ def run_api_refresh(): 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: + change_status = False if check_if_user_has_permission(user, "member"): - remove_member_permission(user, "member") - remove_user_from_group(user, settings.DEFAULT_AUTH_GROUP) + #remove auth member to prepare for member to blue transition + disable_alliance_member(user, authserviceinfo.main_char_id) + change_status = True if not check_if_user_has_permission(user, "blue_member"): + #perform member to blue transition add_member_permission(user, "blue_member") add_user_to_group(user, settings.DEFAULT_BLUE_GROUP) - - #Fix mumble username ticker - MumbleManager.delete_user(authserviceinfo.mumble_username) - remove_all_syncgroups_for_service(user, "mumble") - AuthServicesInfoManager.update_user_mumble_info("", "", request.user) - - #make new user (how generous) - result = MumbleManager.create_blue_user(character.corporation_ticker, character.character_name) - AuthServicesInfoManager.update_user_mumble_info(result[0], result[1], user) - update_mumble_groups(request.user) + change_status = True + + #if user has mumble account, rename it with proper ticker + if (not authserviceinfo.mumble_username == "") and change_status: + #Fix mumble username ticker + MumbleManager.delete_user(authserviceinfo.mumble_username) + remove_all_syncgroups_for_service(user, "mumble") + AuthServicesInfoManager.update_user_mumble_info("", "", request.user) + #make new user (how generous) + result = MumbleManager.create_blue_user(character.corporation_ticker, character.character_name) + AuthServicesInfoManager.update_user_mumble_info(result[0], result[1], user) + update_mumble_groups(request.user) else: + # disable accounts with missing corp data if check_if_user_has_permission(user, "member"): disable_alliance_member(user, authserviceinfo.main_char_id) elif check_if_user_has_permission(user, "blue_member"): @@ -268,7 +278,7 @@ def run_api_refresh(): deactivate_services(user) else: - # nuke it + # disable accounts with invalid keys if check_if_user_has_permission(user, "member"): disable_alliance_member(user, authserviceinfo.main_char_id) elif check_if_user_has_permission(user, "blue_member"): @@ -286,12 +296,27 @@ def run_corp_update(): # I am not proud of this block of code if EveApiManager.check_if_api_server_online(): - # Create the corp - corpinfo = EveApiManager.get_corporation_information(settings.CORP_ID) - if not EveManager.check_if_corporation_exists_by_id(corpinfo['id']): - EveManager.create_corporation_info(corpinfo['id'], corpinfo['name'], corpinfo['ticker'], - corpinfo['members']['current'], False, None) - + if settings.IS_CORP: + # Create the corp + corpinfo = EveApiManager.get_corporation_information(settings.CORP_ID) + if not EveManager.check_if_corporation_exists_by_id(corpinfo['id']): + EveManager.create_corporation_info(corpinfo['id'], corpinfo['name'], corpinfo['ticker'], + corpinfo['members']['current'], False, None) + else: + # Updated alliance info + alliance_info = EveApiManager.get_alliance_information(settings.ALLIANCE_ID) + + # Populate alliance info + 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'], + alliance_info['executor_id'], alliance_info['member_count'], False) + alliance = EveManager.get_alliance_info_by_id(settings.ALLIANCE_ID) + # Create the corps in the alliance + for alliance_corp in alliance_info['member_corps']: + corpinfo = EveApiManager.get_corporation_information(alliance_corp) + if not EveManager.check_if_corporation_exists_by_id(corpinfo['id']): + EveManager.create_corporation_info(corpinfo['id'], corpinfo['name'], corpinfo['ticker'], + corpinfo['members']['current'], False, alliance) #determine what level of standings to check #refer to https://github.com/eve-val/evelink/blob/master/evelink/parsing/contact_list.py#L43 @@ -333,7 +358,10 @@ def run_corp_update(): # Update all allinace info's for all_alliance_info in EveManager.get_all_alliance_info(): all_alliance_api_info = EveApiManager.get_alliance_information(all_alliance_info.alliance_id) - if standing_level in corp_standings: + if (not settings.IS_CORP and all_alliance_info.alliance_id == settings.ALLIANCE_ID): + EveManager.update_alliance_info(all_alliance_api_info['id'], all_alliance_api_info['executor_id'], + all_alliance_api_info['member_count'], False) + elif standing_level in corp_standings: if int(all_alliance_info.alliance_id) in corp_standings[standing_level]: if int(corp_standings[standing_level][int(all_alliance_info.alliance_id)][ 'standing']) >= settings.BLUE_STANDING: @@ -362,7 +390,9 @@ def run_corp_update(): if alliance is not None and all_corp_info.alliance is not None: - if int(alliance.alliance_id) in corp_standings[standing_level]: + if (not settings.IS_CORP) and (all_corp_info.alliance.alliance_id == settings.ALLIANCE_ID): + EveManager.update_corporation_info(corpinfo['id'], corpinfo['members']['current'], alliance, False) + elif int(alliance.alliance_id) in corp_standings[standing_level]: if int(corp_standings[standing_level][int(alliance.alliance_id)][ 'standing']) >= settings.BLUE_STANDING: EveManager.update_corporation_info(corpinfo['id'], corpinfo['members']['current'], alliance, @@ -383,15 +413,18 @@ def run_corp_update(): else: EveManager.update_corporation_info(corpinfo['id'], corpinfo['members']['current'], None, False) - # Nuke the none believers + # Remove irrelevent corp and alliance models # Check the corps for all_corp_info in EveManager.get_all_corporation_info(): - if all_corp_info.corporation_id != settings.CORP_ID: + 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 not all_corp_info.is_blue: all_corp_info.delete() # Check the alliances for all_alliance_info in EveManager.get_all_alliance_info(): + if (not settings.IS_CORP and all_alliance_info.alliance_id != settings.ALLIANCE_ID): + if all_alliance_info.is_blue is not True: + all_alliance_info.delete() if all_alliance_info.is_blue is not True: all_alliance_info.delete() diff --git a/eveonline/forms.py b/eveonline/forms.py index c0b6c17e..a4a9a43d 100644 --- a/eveonline/forms.py +++ b/eveonline/forms.py @@ -7,7 +7,7 @@ from eveonline.managers import EveManager class UpdateKeyForm(forms.Form): api_id = forms.CharField(max_length=254, required=True, label="Key ID") api_key = forms.CharField(max_length=254, required=True, label="Verification Code") - is_blue = forms.BooleanField(label="Blue to corp", required=False) + is_blue = forms.BooleanField(label="Blue to corp/alliance", required=False) def clean(self): if EveManager.check_if_api_key_pair_exist(self.cleaned_data['api_id']): diff --git a/eveonline/views.py b/eveonline/views.py index 3f98e3b6..d5b4ab58 100755 --- a/eveonline/views.py +++ b/eveonline/views.py @@ -104,7 +104,7 @@ def main_character_change(request, char_id): character_info = EveManager.get_character_by_id(char_id) corporation_info = EveManager.get_corporation_info_by_id(character_info.corporation_id) - if EveManager.get_charater_corporation_id_by_id(char_id) == settings.CORP_ID: + if (settings.IS_CORP and EveManager.get_charater_corporation_id_by_id(char_id) == settings.CORP_ID) or (not settings.IS_CORP and EveManager.get_charater_alliance_id_by_id(char_id) == settings.ALLIANCE_ID): add_member_permission(request.user, 'member') add_user_to_group(request.user, settings.DEFAULT_AUTH_GROUP) add_user_to_group(request.user, From 984ab31d3348c8261614d3ef43e10bcf065910ed Mon Sep 17 00:00:00 2001 From: Adarnof Date: Sat, 31 Oct 2015 17:59:27 -0400 Subject: [PATCH 2/2] changed templates to reflect corp or alliance toggle created context processors for IS_CORP, ALLIANCE_ID and ALLIANCE_NAME variables Signed-off-by: Adarnof --- alliance_auth/settings.py.example | 3 +++ templates/public/login.html | 9 ++++++--- templates/public/register.html | 6 +++++- templates/registered/addapikey.html | 19 +++++++++++++------ templates/registered/corpstats.html | 6 +++++- templates/registered/dashboard.html | 8 ++++++-- templates/registered/groups.html | 6 +++++- templates/registered/services.html | 6 +++++- .../registration/password_reset_complete.html | 6 +++++- .../registration/password_reset_confirm.html | 7 +++++-- .../registration/password_reset_form.html | 6 +++++- util/context_processors.py | 9 ++++++++- 12 files changed, 71 insertions(+), 20 deletions(-) diff --git a/alliance_auth/settings.py.example b/alliance_auth/settings.py.example index 9c7a6a2c..d86a64df 100755 --- a/alliance_auth/settings.py.example +++ b/alliance_auth/settings.py.example @@ -112,8 +112,11 @@ TEMPLATE_CONTEXT_PROCESSORS = ( 'django.core.context_processors.tz', 'django.contrib.messages.context_processors.messages', 'django.core.context_processors.request', + 'util.context_processors.is_corp', 'util.context_processors.corp_id', 'util.context_processors.corp_name', + 'util.context_processors.alliance_id', + 'util.context_processors.alliance_name', 'util.context_processors.jabber_url', 'util.context_processors.domain_url' ) diff --git a/templates/public/login.html b/templates/public/login.html index 364536bb..c6e05a8f 100644 --- a/templates/public/login.html +++ b/templates/public/login.html @@ -10,9 +10,12 @@ - - {{ CORP_NAME }} - Login - + {% if IS_CORP %} + {{ CORP_NAME }} - Login + {% else %} + {{ ALLIANCE_NAME }} - Login + {% endif %} + diff --git a/templates/public/register.html b/templates/public/register.html index d6e9a881..e61547ad 100644 --- a/templates/public/register.html +++ b/templates/public/register.html @@ -10,7 +10,11 @@ - {{ CORP_NAME }} - Login + {% if IS_CORP %} + {{ CORP_NAME }} - Login + {% else %} + {{ ALLIANCE_NAME }} - Login + {% endif %} diff --git a/templates/registered/addapikey.html b/templates/registered/addapikey.html index d39478c3..1f802162 100644 --- a/templates/registered/addapikey.html +++ b/templates/registered/addapikey.html @@ -23,12 +23,19 @@ href="https://community.eveonline.com/support/api-key/CreatePredefined?accessMask=268435455">Create a full API key

- -

- NOTE: If you are part of the corp do not check "Blue" this is for people who are blue to the - corp - but are not in it. Blue access is limited. -

+ {% if IS_CORP %} +

+ NOTE: If you are part of the corp do not check "Blue", this is for people who are blue to the + corp + but are not in it. Blue access is limited. +

+ {% else %} +

+ NOTE: If you are part of the alliance do not check "Blue", this is for people who are blue to the + alliance + but are not in it. Blue access is limited. +

+ {% endif %}

Do not change the accessmask or deselect options or it will not work

diff --git a/templates/registered/corpstats.html b/templates/registered/corpstats.html index b5db3f77..050dc2ee 100755 --- a/templates/registered/corpstats.html +++ b/templates/registered/corpstats.html @@ -67,7 +67,11 @@ {% else %} -

Not part of the corporation

+ {% if IS_CORP %} + + {% else %} + + {% endif %} {% endif %} {% endblock content %} diff --git a/templates/registered/dashboard.html b/templates/registered/dashboard.html index a35fa91b..8cc27ea5 100644 --- a/templates/registered/dashboard.html +++ b/templates/registered/dashboard.html @@ -1,6 +1,6 @@ {% extends "public/base.html" %} {% block title %}Alliance Auth{% endblock %} -{% block page_title %}Something something here{% endblock page_title %} +{% block page_title %}Dashboard{% endblock page_title %} {% block content %} @@ -59,7 +59,11 @@ {% else %} -

Not part of the corporation

+ {% if IS_CORP %} +

Not part of the corporation.

+ {% else %} +

Not part of the alliance.

+ {% endif %} {% endif %} {% endblock content %} diff --git a/templates/registered/groups.html b/templates/registered/groups.html index 82f25822..49ebe67a 100644 --- a/templates/registered/groups.html +++ b/templates/registered/groups.html @@ -52,7 +52,11 @@ {% endfor %} {% else %} - + {% if IS_CORP %} + + {% else %} + + {% endif %} {% endif %} diff --git a/templates/registered/services.html b/templates/registered/services.html index 90eb0fe8..81935390 100755 --- a/templates/registered/services.html +++ b/templates/registered/services.html @@ -300,7 +300,11 @@ {% endif %} {% else %} - + {% if IS_CORP %} + + {% else %} + + {% endif %} {% endif %} diff --git a/templates/registration/password_reset_complete.html b/templates/registration/password_reset_complete.html index dd2d7597..0f904ed8 100644 --- a/templates/registration/password_reset_complete.html +++ b/templates/registration/password_reset_complete.html @@ -12,7 +12,11 @@ - {{ CORP_NAME }} - Login + {% if IS_CORP %} + {{ CORP_NAME }} - Login + {% else %} + {{ ALLIANCE_NAME }} - Login + {% endif %} diff --git a/templates/registration/password_reset_confirm.html b/templates/registration/password_reset_confirm.html index 13d5d062..14c81116 100644 --- a/templates/registration/password_reset_confirm.html +++ b/templates/registration/password_reset_confirm.html @@ -12,8 +12,11 @@ - {{ CORP_NAME }} - Login - + {% if IS_CORP %} + {{ CORP_NAME }} - Login + {% else %} + {{ ALLIANCE_NAME }} - Login + {% endif %} diff --git a/templates/registration/password_reset_form.html b/templates/registration/password_reset_form.html index 1bdbc9e4..4470f79d 100644 --- a/templates/registration/password_reset_form.html +++ b/templates/registration/password_reset_form.html @@ -12,7 +12,11 @@ - {{ CORP_NAME }} - Login + {% if IS_CORP %} + {{ CORP_NAME }} - Login + {% else %} + {{ ALLIANCE_NAME }} - Login + {% endif %} diff --git a/util/context_processors.py b/util/context_processors.py index e20f5568..1e188065 100755 --- a/util/context_processors.py +++ b/util/context_processors.py @@ -2,13 +2,20 @@ from django.conf import settings from django.utils import timezone +def is_corp(request): + return {'IS_CORP': settings.IS_CORP} + def corp_id(request): return {'CORP_ID': settings.CORP_ID} - def corp_name(request): return {'CORP_NAME': settings.CORP_NAME} +def alliance_id(request): + return {'ALLIANCE_ID': settings.ALLIANCE_ID} + +def alliance_name(request): + return {'ALLIANCE_NAME': settings.CORP_NAME} def jabber_url(request): return {'JABBER_URL': settings.JABBER_URL}