mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-20 09:42:29 +02:00
Compare commits
11 Commits
2443444cb2
...
0e0b21aeef
Author | SHA1 | Date | |
---|---|---|---|
|
0e0b21aeef | ||
|
b459f96e6b | ||
|
bf32f2c1ef | ||
|
7ca67ebaae | ||
|
fa32f87a35 | ||
|
a630015451 | ||
|
bf43f59232 | ||
|
0285c758fa | ||
|
4642798835 | ||
|
027d88d55a | ||
|
5fe9f9a984 |
32
README.md
32
README.md
@ -1,15 +1,15 @@
|
||||
# Alliance Auth
|
||||
|
||||
[](https://pypi.org/project/allianceauth/)
|
||||
[](https://pypi.org/project/allianceauth/)
|
||||
[](https://pypi.org/project/allianceauth/)
|
||||
[](https://pypi.org/project/allianceauth/)
|
||||
[](https://gitlab.com/allianceauth/allianceauth/commits/master)
|
||||
[](https://pypi.org/project/allianceauth/)
|
||||
[](https://pypi.org/project/allianceauth/)
|
||||
[](https://pypi.org/project/allianceauth/)
|
||||
[](https://pypi.org/project/allianceauth/)
|
||||
[](https://gitlab.com/allianceauth/allianceauth/commits/master)
|
||||
[](https://allianceauth.readthedocs.io/?badge=latest)
|
||||
[](https://gitlab.com/allianceauth/allianceauth/commits/master)
|
||||
[](https://gitlab.com/allianceauth/allianceauth/commits/master)
|
||||
[](https://discord.gg/fjnHAmk)
|
||||
|
||||
An auth system for EVE Online to help in-game organizations manage online service access.
|
||||
A flexible authentication platform for EVE Online to help in-game organizations manage access to applications and services. AA provides both, a stable core, and a robust framework for community development and custom applications.
|
||||
|
||||
## Content
|
||||
|
||||
@ -22,17 +22,17 @@ An auth system for EVE Online to help in-game organizations manage online servic
|
||||
|
||||
## Overview
|
||||
|
||||
Alliance Auth (AA) is a web site that helps Eve Online organizations efficiently manage access to applications and services.
|
||||
Alliance Auth (AA) is a platform that helps Eve Online organizations efficiently manage access to applications and services.
|
||||
|
||||
Main features:
|
||||
|
||||
- Automatically grants or revokes user access to external services (e.g. Discord, Mumble) and web apps (e.g. SRP requests) based on the user's current membership to [in-game organizations](https://allianceauth.readthedocs.io/en/latest/features/core/states/) and [groups](https://allianceauth.readthedocs.io/en/latest/features/core/groups/)
|
||||
- Automatically grants or revokes user access to external services (e.g.: Discord, Mumble) based on the user's current membership to [a variety of EVE Online affiliation](https://allianceauth.readthedocs.io/en/latest/features/core/states/) and [groups](https://allianceauth.readthedocs.io/en/latest/features/core/groups/)
|
||||
|
||||
- Provides a central web site where users can directly access web apps (e.g. SRP requests, Fleet Schedule) and manage their access to external services and groups.
|
||||
|
||||
- Includes a set of connectors (called ["services"](https://allianceauth.readthedocs.io/en/latest/features/services/)) for integrating access management with many popular external applications / services like Discord, Mumble, Teamspeak 3, SMF and others
|
||||
- Includes a set of connectors (called ["Services"](https://allianceauth.readthedocs.io/en/latest/features/services/)) for integrating access management with many popular external applications / services like Discord, Mumble, Teamspeak 3, SMF and others
|
||||
|
||||
- Includes a set of web [apps](https://allianceauth.readthedocs.io/en/latest/features/apps/) which add many useful functions, e.g.: fleet schedule, timer board, SRP request management, fleet activity tracker
|
||||
- Includes a set of web [Apps](https://allianceauth.readthedocs.io/en/latest/features/apps/) which add many useful functions, e.g.: fleet schedule, timer board, SRP request management, fleet activity tracker
|
||||
|
||||
- Can be easily extended with additional services and apps. Many are provided by the community and can be found here: [Community Creations](https://gitlab.com/allianceauth/community-creations)
|
||||
|
||||
@ -42,9 +42,15 @@ For further details about AA - including an installation guide and a full list o
|
||||
|
||||
## Screenshot
|
||||
|
||||
Here is an example of the Alliance Auth web site with some plug-ins apps and services enabled:
|
||||
Here is an example of the Alliance Auth web site with a mixture of Services, Apps and Community Creations enabled:
|
||||
|
||||

|
||||
### Flatly Theme
|
||||
|
||||

|
||||
|
||||
### Darkly Theme
|
||||
|
||||

|
||||
|
||||
## Support
|
||||
|
||||
|
@ -39,13 +39,13 @@ class AutogroupsConfigManager(models.Manager):
|
||||
"""
|
||||
if state is None:
|
||||
state = user.profile.state
|
||||
for config in self.filter(states=state):
|
||||
# grant user new groups for their state
|
||||
config.update_group_membership_for_user(user)
|
||||
for config in self.exclude(states=state):
|
||||
# ensure user does not have groups from previous state
|
||||
config.remove_user_from_alliance_groups(user)
|
||||
config.remove_user_from_corp_groups(user)
|
||||
for config in self.filter(states=state):
|
||||
# grant user new groups for their state
|
||||
config.update_group_membership_for_user(user)
|
||||
|
||||
|
||||
class AutogroupsConfig(models.Model):
|
||||
|
@ -1,3 +1,4 @@
|
||||
from allianceauth.eveonline.models import EveCorporationInfo
|
||||
from django.test import TestCase
|
||||
from allianceauth.tests.auth_utils import AuthUtils
|
||||
|
||||
@ -73,3 +74,51 @@ class AutogroupsConfigManagerTestCase(TestCase):
|
||||
AutogroupsConfig.objects.update_groups_for_user(member)
|
||||
|
||||
self.assertTrue(update_groups.called)
|
||||
|
||||
def test_update_group_membership_corp_in_two_configs(self):
|
||||
# given
|
||||
member = AuthUtils.create_member('test member')
|
||||
AuthUtils.add_main_character_2(
|
||||
member,
|
||||
character_id='1234',
|
||||
name='test character',
|
||||
corp_id='2345',
|
||||
corp_name='corp name',
|
||||
corp_ticker='TIKK',
|
||||
|
||||
)
|
||||
|
||||
corp = EveCorporationInfo.objects.create(
|
||||
corporation_id='2345',
|
||||
corporation_name='corp name',
|
||||
corporation_ticker='TIKK',
|
||||
member_count=10,
|
||||
)
|
||||
|
||||
member_state = AuthUtils.get_member_state()
|
||||
member_config = AutogroupsConfig.objects.create(corp_groups=True)
|
||||
member_config.states.add(member_state)
|
||||
blue_state = AuthUtils.get_blue_state()
|
||||
blue_state.member_corporations.add(corp)
|
||||
blue_config = AutogroupsConfig.objects.create(corp_groups=True)
|
||||
blue_config.states.add(blue_state)
|
||||
|
||||
member.profile.state = blue_state
|
||||
member.profile.save()
|
||||
|
||||
AutogroupsConfig.objects.update_groups_for_user(member)
|
||||
|
||||
# Checks before test that the role is correctly applied
|
||||
group = blue_config.get_corp_group(corp)
|
||||
self.assertIn(group, member.groups.all())
|
||||
|
||||
# when
|
||||
blue_state.member_corporations.remove(corp)
|
||||
member_state.member_corporations.add(corp)
|
||||
member.profile.state = member_state
|
||||
member.profile.save()
|
||||
|
||||
# then
|
||||
AutogroupsConfig.objects.update_groups_for_user(member)
|
||||
group = member_config.get_corp_group(corp)
|
||||
self.assertIn(group, member.groups.all())
|
||||
|
@ -2,8 +2,8 @@
|
||||
{% load navactive %}
|
||||
{% load auth_notifications %}
|
||||
|
||||
<li class="nav-item {% navactive request 'notifications:' %}" id="menu_item_notifications">
|
||||
<a class="nav-link" href="{% url 'notifications:list' %}">
|
||||
<li class="nav-item" id="menu_item_notifications">
|
||||
<a class="nav-link {% navactive request 'notifications:' %}" href="{% url 'notifications:list' %}">
|
||||
{% with unread_count=request.user|user_unread_notification_count %}
|
||||
<i class="fa-solid fa-bell{% if unread_count %} text-danger{% endif %}"></i>
|
||||
{% endwith %}
|
||||
|
@ -439,6 +439,7 @@ class TestUserHasAccount(NoSocketsTestCase):
|
||||
|
||||
def test_return_false_if_user_does_not_exist(self):
|
||||
my_user = User(username='Dummy')
|
||||
my_user.save()
|
||||
self.assertFalse(DiscordUser.objects.user_has_account(my_user))
|
||||
|
||||
def test_return_false_if_not_called_with_user_object(self):
|
||||
|
@ -78,6 +78,13 @@ class AuthUtils:
|
||||
except State.DoesNotExist:
|
||||
return cls.create_state('Member', 100, disconnect_signals=True)
|
||||
|
||||
@classmethod
|
||||
def get_blue_state(cls):
|
||||
try:
|
||||
return State.objects.get(name='Blue')
|
||||
except State.DoesNotExist:
|
||||
return cls.create_state('Blue', 50, disconnect_signals=True)
|
||||
|
||||
@classmethod
|
||||
def get_guest_state(cls):
|
||||
cls.disconnect_signals()
|
||||
|
BIN
docs/_static/images/promotion/SampleInstallation-Darkly.png
vendored
Normal file
BIN
docs/_static/images/promotion/SampleInstallation-Darkly.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 206 KiB |
BIN
docs/_static/images/promotion/SampleInstallation-Flatly.png
vendored
Normal file
BIN
docs/_static/images/promotion/SampleInstallation-Flatly.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 206 KiB |
Loading…
x
Reference in New Issue
Block a user