Alliance Auth - Leave of Absence (aa-loa)
A complete Leave of Absence (LOA) management module for Alliance Auth. This module allows members to declare periods of absence so that leadership is aware of their inactivity, while seamlessly integrating with other Alliance Auth features (like Discord and Activity Trackers) to prevent accidental purges.
Features
- Player Dashboard: Easy-to-use form for players to submit a start date, end date, and an optional reason. Players can also view their past LOAs, and cancel/revoke an active LOA if they return early.
- HR Dashboard: A dedicated view for Directors/HR to see a live table of all active and upcoming LOAs in the alliance.
- Proxy Submission: Directors can submit an LOA on behalf of a member who might be unable to access a PC (e.g. emergencies).
- Discord Role Sync: Assigns members to a specific Django Group (e.g.,
[On Leave]) when their LOA becomes active. Alliance Auth will automatically sync this to Discord, TS, or Mumble. - Purge Protection: Because the member is in the
[On Leave]group, audit modules (likeaa-inactivesoropcalendar) can simply whitelist this group to exempt the member from activity purges. - Webhooks: Automatically posts a Discord Embed to a webhook URL whenever an LOA is submitted.
- Welcome Back Notification: A Celery task automatically removes the member from the LOA group when the end date passes, and sends a "Welcome Back" Alliance Auth notification.
🤖 Optional: Discord Bot Integration (aa-discordbot)
While aa-loa works perfectly fine on its own, it integrates natively with aa-discordbot.
If your alliance has aa-discordbot installed, the internal Alliance Auth notifications generated by this module will automatically be forwarded as Direct Messages (DMs) on Discord to the user. This applies to:
- 📩 The "Welcome Back" notification when an LOA automatically expires.
- 🛑 The "Cancellation" notification when HR manually cancels a player's LOA.
Installation
1. Install the Python Package
Activate your Alliance Auth virtual environment and install the package:
pip install -e /path/to/aa-loa/
2. Update Alliance Auth Settings
Open your myauth/settings/local.py file and add 'aa_loa' to your INSTALLED_APPS:
INSTALLED_APPS += [
# ... other apps
'aa_loa',
]
3. Run Database Migrations
Run the migrations to create the database tables:
python manage.py makemigrations aa_loa
python manage.py migrate
4. Restart Services
Restart your Alliance Auth web service and Celery workers so they pick up the new code and background tasks:
sudo systemctl restart supervisor
(Or restart the specific services depending on your hosting environment).
Configuration
1. Setup the LOA Group
- Go to the Django Admin Panel (
/admin/). - Navigate to Authentication and Authorization -> Groups and create a new group (e.g.,
On Leave).- Optional: Configure this group in your Discord/TS services to map to a specific
[On Leave]Discord Role.
- Optional: Configure this group in your Discord/TS services to map to a specific
- Navigate to Leave of Absence Configuration -> LOA Config.
- Add a new configuration row.
- Select the
On Leavegroup you just created. - (Optional) Paste a Discord Webhook URL if you want real-time notifications in an HR channel when LOAs are submitted.
2. Permissions
Assign the following permissions to the appropriate states or groups in Alliance Auth:
| Permission | Description |
|---|---|
aa_loa.basic_access |
Grants access to the LOA module for normal members. Allows them to submit and manage their own LOAs. |
aa_loa.manage_loa |
Grants access to the HR Dashboard. Allows users to view all LOAs and submit proxy LOAs for other members. |
3. Setup the Celery Periodic Task
To ensure LOA groups are automatically assigned and removed every night, you need to configure the daily Celery task in your local.py settings file.
Open your myauth/settings/local.py and add the following to your CELERYBEAT_SCHEDULE dictionary:
from celery.schedules import crontab
CELERYBEAT_SCHEDULE['aa_loa_sync_groups'] = {
'task': 'aa_loa.tasks.sync_loa_groups',
'schedule': crontab(minute='0', hour='0'),
}
Restart your celery worker (sudo systemctl restart supervisor) and the system will automatically activate/deactivate LOAs every day at midnight!
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aa_loa-0.0.3.tar.gz.
File metadata
- Download URL: aa_loa-0.0.3.tar.gz
- Upload date:
- Size: 12.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0f297856a29dbbddd27ccd527c6ec831c82752f3ac4923d737a177c5ac271181
|
|
| MD5 |
d2fb886013408ed8397d919e8d7c48dc
|
|
| BLAKE2b-256 |
ee9efab685c1508c23b8b173c62b2f635a517093421f4aa2c925951ef5c6becd
|
Provenance
The following attestation bundles were made for aa_loa-0.0.3.tar.gz:
Publisher:
release.yml on mbroekman/aa-loa
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aa_loa-0.0.3.tar.gz -
Subject digest:
0f297856a29dbbddd27ccd527c6ec831c82752f3ac4923d737a177c5ac271181 - Sigstore transparency entry: 2237609308
- Sigstore integration time:
-
Permalink:
mbroekman/aa-loa@719e494b8d44d03ba826a80654e44c162e08d4c0 -
Branch / Tag:
refs/tags/v0.0.3 - Owner: https://github.com/mbroekman
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@719e494b8d44d03ba826a80654e44c162e08d4c0 -
Trigger Event:
release
-
Statement type:
File details
Details for the file aa_loa-0.0.3-py3-none-any.whl.
File metadata
- Download URL: aa_loa-0.0.3-py3-none-any.whl
- Upload date:
- Size: 18.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5814f1c58125e8c5b0c06624b8fd9e37075bc105e5fa28e6a88d0e970c5f0563
|
|
| MD5 |
9ba1826f09a5e31b2273402169c7a5a5
|
|
| BLAKE2b-256 |
59118bda19c1dd64f41bd890e0f1cbd3fba8e28e6eee7a7ecefb071a7a20799f
|
Provenance
The following attestation bundles were made for aa_loa-0.0.3-py3-none-any.whl:
Publisher:
release.yml on mbroekman/aa-loa
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aa_loa-0.0.3-py3-none-any.whl -
Subject digest:
5814f1c58125e8c5b0c06624b8fd9e37075bc105e5fa28e6a88d0e970c5f0563 - Sigstore transparency entry: 2237609571
- Sigstore integration time:
-
Permalink:
mbroekman/aa-loa@719e494b8d44d03ba826a80654e44c162e08d4c0 -
Branch / Tag:
refs/tags/v0.0.3 - Owner: https://github.com/mbroekman
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@719e494b8d44d03ba826a80654e44c162e08d4c0 -
Trigger Event:
release
-
Statement type: