more automated upgrades

This commit is contained in:
Ariel Rin
2023-10-27 22:19:28 +10:00
parent ffb526ab0c
commit 906c589f14
28 changed files with 96 additions and 133 deletions

View File

@@ -2,11 +2,11 @@
This section describes how to extend **Alliance Auth** with custom apps and services.
```{toctree}
:::{toctree}
:maxdepth: 1
integrating-services
menu-hooks
url-hooks
logging
```
:::

View File

@@ -46,10 +46,9 @@ In order to integrate with Alliance Auth service modules must provide a `service
This would register the ExampleService class which would need to be a subclass of `services.hooks.ServiceHook`.
```{eval-rst}
.. important::
:::{important}
The hook **MUST** be registered in ``yourservice.auth_hooks`` along with any other hooks you are registering for Alliance Auth.
```
:::
A subclassed `ServiceHook` might look like this:

View File

@@ -40,13 +40,11 @@ A list of views or namespaces the link should be highlighted on. See [django-nav
This is a great feature to signal the user, that he has some open issues to take care of within an app. For example Auth uses this feature to show the specific number of open group request to the current user.
```{eval-rst}
.. hint::
:::{hint}
Here is how to stay consistent with the Auth design philosophy for using this feature:
1. Use it to display open items that the current user can close by himself only. Do not use it for items, that the user has no control over.
2. If there are currently no open items, do not show a badge at all.
```
:::
To use it set count the `render()` function of your subclass in accordance to the current user. Here is an example:
```Python