mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-12-19 07:15:04 +01:00
Minor Documentation Update (#1019)
Gunicorn needs to be run whilist in the folder for context, folder path is not enough Correct static path, note to check nginx user Capitalization of services and small typos Service examples updated to their latest versions and download links Expanded /var/www chowns for Nginx and Apache examples Add in a troubleshooting note for no images being displayed (permissions issue) and gunicorn not execting (file path context) Correct formatting. Reword a few parts. Remove "new in 1.15".
This commit is contained in:
@@ -5,7 +5,7 @@ The documentation for Alliance Auth uses [Sphinx](http://www.sphinx-doc.org/) to
|
||||
[readthedocs.org](https://readthedocs.org/).
|
||||
|
||||
|
||||
Documentation was migrated from the Github wiki pages and into the repository to allow documentation changes to be
|
||||
Documentation was migrated from the GitHub wiki pages and into the repository to allow documentation changes to be
|
||||
included with pull requests. This means that documentation can be guaranteed to be updated when a pull request is
|
||||
accepted rather than hoping documentation is updated afterwards or relying on maintainers to do the work. It also
|
||||
allows for documentation to be maintained at different versions more easily.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Integrating Services
|
||||
|
||||
One of the primary roles of Alliance Auth is integrating with external services in order to authenticate and manage users. This is achieved through the use of service modules.
|
||||
One of the primary roles of Alliance Auth is integrating with external services in order to authenticate and manage users. This is achieved through the use of service modules.
|
||||
|
||||
## The Service Module
|
||||
|
||||
@@ -29,8 +29,8 @@ The architecture looks something like this:
|
||||
|
|
||||
|
|
||||
AllianceAuth
|
||||
|
||||
|
||||
|
||||
|
||||
Where:
|
||||
Module --▶ Dependency/Import
|
||||
|
||||
@@ -46,10 +46,10 @@ 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::
|
||||
The hook **MUST** be registered in `yourservice.auth_hooks` along with any other hooks you are registering for Alliance Auth.
|
||||
The hook **MUST** be registered in ``yourservice.auth_hooks`` along with any other hooks you are registering for Alliance Auth.
|
||||
```
|
||||
|
||||
|
||||
@@ -97,7 +97,7 @@ Functions:
|
||||
Internal name of the module, should be unique amongst modules.
|
||||
|
||||
#### self.urlpatterns
|
||||
You should define all of your service urls internally, usually in `urls.py`. Then you can import them and set `self.urlpatterns` to your defined urlpatterns.
|
||||
You should define all of your service URLs internally, usually in `urls.py`. Then you can import them and set `self.urlpatterns` to your defined urlpatterns.
|
||||
|
||||
from . import urls
|
||||
...
|
||||
@@ -105,7 +105,7 @@ You should define all of your service urls internally, usually in `urls.py`. The
|
||||
def __init__(self):
|
||||
...
|
||||
self.urlpatterns = urls.urlpatterns
|
||||
|
||||
|
||||
All of your apps defined urlpatterns will then be included in the `URLconf` when the core application starts.
|
||||
|
||||
#### self.service_ctrl_template
|
||||
@@ -147,7 +147,7 @@ If this function is defined, an admin action will be registered on the Django Us
|
||||
#### update_groups
|
||||
`def update_groups(self, user):`
|
||||
|
||||
Update the users group membership. The `user` parameter should be a Django User object.
|
||||
Update the users group membership. The `user` parameter should be a Django User object.
|
||||
When this is called the service should determine the groups the user is a member of and synchronise the group membership with the external service. If you service does not support groups then you are not required to define this.
|
||||
|
||||
If this function is defined, an admin action will be registered on the Django Users view, allowing admins to manually trigger this action for one or many users. The hook will trigger this action user by user, so you won't have to manage a list of users.
|
||||
@@ -176,7 +176,7 @@ Should the service be shown for the given `user` with the given `state`? The `us
|
||||
Usually you wont need to override this function.
|
||||
|
||||
For more information see the [render_service_ctrl](#render-service-ctrl) section.
|
||||
|
||||
|
||||
#### render_service_ctrl
|
||||
`def render_services_ctrl(self, request):`
|
||||
|
||||
@@ -221,7 +221,7 @@ Most services will survive with the default template. If, however, you require e
|
||||
|
||||
If you services needs cannot be satisfied by the Service Control row, you are free to specify extra hooks by subclassing or instantiating the `services.hooks.MenuItemHook` class.
|
||||
|
||||
For more information see the [Menu Hooks](menu-hooks.md) page.
|
||||
For more information see the [Menu Hooks](menu-hooks.md) page.
|
||||
|
||||
### The Service Manager
|
||||
|
||||
|
||||
Reference in New Issue
Block a user