An open API service indexing awesome lists of open source software.

https://github.com/ppfeufer/aa-srp

SRP Module for Alliance Auth
https://github.com/ppfeufer/aa-srp

allianceauth django ship-replacement

Last synced: 3 months ago
JSON representation

SRP Module for Alliance Auth

Awesome Lists containing this project

README

          

# AA SRP

[![Badge: Version]][aa srp on pypi]
[![Badge: License]][aa srp license]
[![Badge: Supported Python Versions]][aa srp on pypi]
[![Badge: Supported Django Versions]][aa srp on pypi]
![Badge: pre-commit]
[![Badge: pre-commit.ci status]][pre-commit.ci status]
[![Badge: Code Style: black]][black code formatter documentation]
[![Badge: Support Discord]][support discord]
[![Badge: Automated Tests]][automated tests on github]
[![Badge: Code Coverage]][aa srp on codecov]
[![Badge: Translation Status]][weblate engage]
[![Badge: Contributor Covenant]][code of conduct]

[![Badge: Buy me a coffee]][ppfeufer on ko-fi]

SRP Module for [Alliance Auth]

______________________________________________________________________

- [Overview](#overview)
- [Features](#features)
- [Screenshots](#screenshots)
- [Dashboard](#dashboard)
- [Dashboard (View All)](#dashboard-view-all)
- [Your SRP Requests](#your-srp-requests)
- [SRP Requests Overview](#srp-requests-overview)
- [SRP Request Details](#srp-request-details)
- [Installation](#installation)
- [Prerequisites](#prerequisites)
- [Bare Metal Installation](#bare-metal-installation)
- [Step 1: Install the Package](#step-1-install-the-package)
- [Step 2: Configure Alliance Auth](#step-2-configure-alliance-auth)
- [Step 3: Finalizing the Installation](#step-3-finalizing-the-installation)
- [Docker Installation](#docker-installation)
- [Step 1: Add the App](#step-1-add-the-app)
- [Step 2: Update Your AA Settings](#step-2-update-your-aa-settings)
- [Step 3: Build Auth and Restart Your Containers](#step-3-build-auth-and-restart-your-containers)
- [Step 4: Finalizing the Installation](#step-4-finalizing-the-installation)
- [Common Installation Steps](#common-installation-steps)
- [Setting up Permissions](#setting-up-permissions)
- [(Optional) Import From Built-in SRP Module](#optional-import-from-built-in-srp-module)
- [Bare Metal Installation](#bare-metal-installation-1)
- [Docker Installation](#docker-installation-1)
- [(Optional) Settings for Discord Proxy (If Used)](#optional-settings-for-discord-proxy-if-used)
- [Docker Installation](#docker-installation-2)
- [Updating](#updating)
- [Bare Metal Installation](#bare-metal-installation-2)
- [Docker Installation](#docker-installation-3)
- [Permissions](#permissions)
- [Changelog](#changelog)
- [Translation Status](#translation-status)
- [Contributing](#contributing)

______________________________________________________________________

## Overview

### Features

- Overview of SRP links
- Overview of your own SRP requests and their status
- Accepting kill mails from [zKillboard], [EveTools Killboard] and [EVE-Kill]
- SRP Request administration is mostly done via ajax and without page reloads
- Use modern DataTables with filters where ever they're useful
- Tables fully searchable and sortable
- Mandatory reason on SRP reject
- Notifications in AA with detailed information on SRP rejection
- Discord notification via PM to the user on SRP request approval or rejection, if
either [AA-Discordbot], [Discord Notify] or [Discord Proxy] is installed
- Notify your SRP team (optional) in their Discord channel about new SRP requests, if
[AA-Discordbot] or [Discord Proxy] is installed

### Screenshots

#### Dashboard

![Image: AA SRP Dashboard]

#### Dashboard (View All)

![Image: AA SRP Dashboard (View All)]

#### Your SRP Requests

![Image: Your SRP Requests View]

#### SRP Requests Overview

![Image: SRP Requests Overview]

#### SRP Request Details

![Image: SRP Request Details]

## Installation

### Prerequisites

> [!IMPORTANT]
>
> Please make sure you meet all prerequisites before you proceed!

- AA SRP is a plugin for Alliance Auth. If you don't have Alliance Auth running
already, please install it first before proceeding. (see the official
[Alliance Auth installation guide] for details)
- AA SRP needs at least Alliance Auth v4.12.0

### Bare Metal Installation

#### Step 1: Install the Package

Make sure you're in the virtual environment (venv) of your Alliance Auth
installation Then install the latest release directly from PyPi.

```shell
pip install aa-srp==4.2.2
```

#### Step 2: Configure Alliance Auth

This is fairly simple, just add the following to the `INSTALLED_APPS` of your `local.py`

Configure your AA settings (`local.py`) as follows:

```python
INSTALLED_APPS += [
# …
"eve_sde", # Only if not already added for another app
"aasrp",
# …
]

# This line is right below the `INSTALLED_APPS` list, and only if not already added for another app
INSTALLED_APPS = ["modeltranslation"] + INSTALLED_APPS
```

Add the following new task to ensure the SDE data is kept up to date:

```python
if "eve_sde" in INSTALLED_APPS:
# Run at 12:00 UTC each day
CELERYBEAT_SCHEDULE["EVE SDE :: Check for SDE Updates"] = {
"task": "eve_sde.tasks.check_for_sde_updates",
"schedule": crontab(minute="0", hour="12"),
}
```

#### Step 3: Finalizing the Installation

Run static files collection and migrations

Migrate and populate SDE:

```shell
python manage.py migrate eve_sde
python manage.py esde_load_sde
```

Migare the app and run static collection:

```shell
python manage.py migrate aasrp
python manage.py collectstatic --noinput
```

Restart your supervisor services for Auth

### Docker Installation

#### Step 1: Add the App

Add the app to your `conf/requirements.txt`

```requirements
aa-srp==4.2.2
```

#### Step 2: Update Your AA Settings

Configure your AA settings as (`conf/local.py`) follows:

```python
INSTALLED_APPS += [
# …
"eve_sde", # Only if not already added for another app
"aasrp",
# …
]

# This line is right below the `INSTALLED_APPS` list, and only if not already added for another app
INSTALLED_APPS = ["modeltranslation"] + INSTALLED_APPS
```

Add the following new task to ensure the SDE data is kept up to date:

```python
if "eve_sde" in INSTALLED_APPS:
# Run at 12:00 UTC each day
CELERYBEAT_SCHEDULE["EVE SDE :: Check for SDE Updates"] = {
"task": "eve_sde.tasks.check_for_sde_updates",
"schedule": crontab(minute="0", hour="12"),
}
```

#### Step 3: Build Auth and Restart Your Containers

```shell
docker compose build --no-cache
docker compose --env-file=.env up -d
```

#### Step 4: Finalizing the Installation

Run migrations and copy static files:

```shell
docker compose exec allianceauth_gunicorn bash

auth migrate eve_sde
auth esde_load_sde

auth migrate aasrp
auth collectstatic
```

### Common Installation Steps

#### Setting up Permissions

Now it's time to set up access permissions for your new SRP module. You can do so in
your admin backend in the AA SRP section. Read the [Permissions](#permissions)
section for more information about the available permissions.

#### (Optional) Import From Built-in SRP Module

> [!NOTE]
>
> This step is only needed when you have been using the built-in SRP module until now.
>
> The import process can be done at any given time and doesn't necessarily have to be during the installation.

> [!IMPORTANT]
>
> Make sure you don't have any open SRP requests before. All SRP links in the built-in
> module will be closed during the import process, to make sure to not import any
> duplicates.

To import your SRP information from the built-in SRP module, run the following:

##### Bare Metal Installation

```shell
python manage.py aasrp_migrate_srp_data
```

##### Docker Installation

```shell
docker compose exec allianceauth_gunicorn bash

auth aasrp_migrate_srp_data
```

#### (Optional) Settings for Discord Proxy (If Used)

> [!NOTE]
>
> This step is only needed if you want to use Discord notifications and have
> [Discord Proxy] installed.

If you are using [Discord Proxy] to send Discord messages, you can configure the host and port in your `local.py` settings.

| Name | Description | Default |
| ------------------- | ------------------------------------------------ | ----------- |
| `DISCORDPROXY_HOST` | Hostname used to communicate with Discord Proxy. | `localhost` |
| `DISCORDPROXY_PORT` | Port used to communicate with Discord Proxy. | `50051` |

##### Docker Installation

If you have [Discord Proxy] installed via Docker ([see here](https://discordproxy.readthedocs.io/en/latest/operations.html#docker-aa4)), you should set the
following:

```python
DISCORDPROXY_HOST = "allianceauth_discordproxy"
```

## Updating

### Bare Metal Installation

To update your existing installation of AA SRP, first enable your virtual environment
(venv) of your Alliance Auth installation.

Then run the following command to update AA SRP to the latest version.

```shell
pip install aa-srp==4.2.2

python manage.py collectstatic
python manage.py migrate

redis-cli flushall
```

Restart your supervisor services for Auth.

### Docker Installation

To update your existing installation of AA SRP, first update the version in your
`conf/requirements.txt` to the latest version.

```requirements
aa-srp==4.2.2
```

Then build your Auth container and restart your containers.

```shell
docker compose build
docker compose --env-file=.env up -d
```

After that, run the following commands to update your database and static files:

```shell
docker compose exec allianceauth_gunicorn bash

auth collectstatic
auth migrate
```

## Permissions

| ID | Description | Notes |
| --------------------- | ---------------------------- | ----------------------------------------------------------------------------------------------------------- |
| `basic_access` | Can access the AA SRP module | Your line members should have this permission. |
| `create_srp` | Can create new SRP links | Your FCs should have this permission. |
| `manage_srp` | Can manage SRP | Users with this permission can manage the AA SRP Module. Like changing and removing SRP links and requests. |
| `manage_srp_requests` | Can manage SRP requests | Users with this permission can manage the SRP requests. Like changing and removing SRP requests. |

## Changelog

See [CHANGELOG.md]

## Translation Status

[![Translation status](https://weblate.ppfeufer.de/widget/alliance-auth-apps/aa-srp/multi-auto.svg)](https://weblate.ppfeufer.de/engage/alliance-auth-apps/)

Do you want to help translate this app into your language or improve the existing
translation? - [Join our team of translators][weblate engage]!

## Contributing

You want to contribute to this project? That's cool!

Please make sure to read the [Contribution Guidelines].\
(I promise, it's not much, just some basics)

[aa srp license]: https://github.com/ppfeufer/aa-srp/blob/master/LICENSE
[aa srp on codecov]: https://codecov.io/gh/ppfeufer/aa-srp
[aa srp on pypi]: https://pypi.org/project/aa-srp/
[aa-discordbot]: https://github.com/pvyParts/allianceauth-discordbot "AA-Discordbot"
[alliance auth]: https://gitlab.com/allianceauth/allianceauth "Alliance Auth"
[alliance auth installation guide]: https://allianceauth.readthedocs.io/en/latest/installation/allianceauth.html "Alliance Auth installation guide"
[automated tests on github]: https://github.com/ppfeufer/aa-srp/actions/workflows/automated-checks.yml
[badge: automated tests]: https://github.com/ppfeufer/aa-srp/actions/workflows/automated-checks.yml/badge.svg "Automated Tests"
[badge: buy me a coffee]: https://ko-fi.com/img/githubbutton_sm.svg "Buy me a coffee"
[badge: code coverage]: https://codecov.io/gh/ppfeufer/aa-srp/branch/master/graph/badge.svg "Code Coverage"
[badge: code style: black]: https://img.shields.io/badge/code%20style-black-000000.svg "Code Style: black"
[badge: contributor covenant]: https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg "Contributor Covenant"
[badge: license]: https://img.shields.io/github/license/ppfeufer/aa-srp "License"
[badge: pre-commit]: https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white "pre-commit"
[badge: pre-commit.ci status]: https://results.pre-commit.ci/badge/github/ppfeufer/aa-srp/master.svg "pre-commit.ci status"
[badge: support discord]: https://img.shields.io/discord/399006117012832262?label=discord "Support Discord"
[badge: supported django versions]: https://img.shields.io/pypi/djversions/aa-srp?label=django "Supported Django Versions"
[badge: supported python versions]: https://img.shields.io/pypi/pyversions/aa-srp "Supported Python Versions"
[badge: translation status]: https://weblate.ppfeufer.de/widget/alliance-auth-apps/aa-srp/svg-badge.svg "Translation Status"
[badge: version]: https://img.shields.io/pypi/v/aa-srp?label=release "Version"
[black code formatter documentation]: http://black.readthedocs.io/en/latest/
[changelog.md]: https://github.com/ppfeufer/aa-srp/blob/master/CHANGELOG.md "CHANGELOG.md"
[code of conduct]: https://github.com/ppfeufer/aa-srp/blob/master/CODE_OF_CONDUCT.md
[contribution guidelines]: https://github.com/ppfeufer/aa-srp/blob/master/CONTRIBUTING.md "Contribution Guidelines"
[discord notify]: https://gitlab.com/ErikKalkoken/aa-discordnotify "Discord Notify"
[discord proxy]: https://gitlab.com/ErikKalkoken/discordproxy "Discord Proxy"
[eve-kill]: https://eve-kill.com/ "EVE-Kill"
[evetools killboard]: https://kb.evetools.org/ "EveTools Killboard"
[image: aa srp dashboard]: https://raw.githubusercontent.com/ppfeufer/aa-srp/master/docs/images/aa-srp-dashboard.jpg "AA SRP Dashboard"
[image: aa srp dashboard (view all)]: https://raw.githubusercontent.com/ppfeufer/aa-srp/master/docs/images/aa-srp-dashboard-view-all.jpg "AA SRP Dashboard (View All)"
[image: srp request details]: https://raw.githubusercontent.com/ppfeufer/aa-srp/master/docs/images/aa-srp-request-details.jpg "SRP Request Details"
[image: srp requests overview]: https://raw.githubusercontent.com/ppfeufer/aa-srp/master/docs/images/aa-srp-requests-overview.jpg "SRP Requests Overview"
[image: your srp requests view]: https://raw.githubusercontent.com/ppfeufer/aa-srp/master/docs/images/aa-srp-your-requests.jpg "Your SRP Requests View"
[ppfeufer on ko-fi]: https://ko-fi.com/N4N8CL1BY
[pre-commit.ci status]: https://results.pre-commit.ci/latest/github/ppfeufer/aa-srp/master "pre-commit.ci"
[support discord]: https://discord.gg/fjnHAmk "Alliance Auth Support Discord"
[weblate engage]: https://weblate.ppfeufer.de/engage/alliance-auth-apps/
[zkillboard]: https://zkillboard.com/ "zKillboard"