mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-12-18 14:55:09 +01:00
Hook URLs require logged in user with a main character.
Should prevent anything else like #983 Heavily inspired by https://gist.github.com/garrypolley/3762045#gistcomment-2089316
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
```eval_rst
|
||||
.. note::
|
||||
Currently most URL patterns are statically defined in the project's core urls.py file. Ideally this behaviour will change over time with each module of Alliance Auth providing all of its menu items via the hook. New modules should aim to use the hook over statically adding URL patterns to the project's patterns.
|
||||
URLs added through URL Hooks are protected by a decorator which ensures the requesting user is logged in and has a main character set.
|
||||
```
|
||||
|
||||
The URL hooks allow you to dynamically specify URL patterns from your plugin app or service. To achieve this you should subclass or instantiate the `services.hooks.UrlHook` class and then register the URL patterns with the hook.
|
||||
|
||||
Reference in New Issue
Block a user