diff --git a/allianceauth/groupmanagement/views.py b/allianceauth/groupmanagement/views.py index 994447dc..e8d68157 100755 --- a/allianceauth/groupmanagement/views.py +++ b/allianceauth/groupmanagement/views.py @@ -388,7 +388,7 @@ def group_request_leave(request, group_id): logger.info(f"{request.user} attempted to leave {group} but already has an pending leave request.") messages.warning(request, _("You already have a pending leave request for that group.")) return redirect("groupmanagement:groups") - if getattr(settings, 'AUTO_LEAVE', False): + if getattr(settings, 'GROUPMANAGEMENT_AUTO_LEAVE', False): logger.info(f"{request.user} leaving joinable group {group} due to auto_leave") request_info = request.user.username + ":" + group.name log = RequestLog(request_type=True, group=group, request_info=request_info, action=1, request_actor=request.user) diff --git a/docs/features/core/groupmanagement.md b/docs/features/core/groupmanagement.md index 1f2685ea..54e58054 100644 --- a/docs/features/core/groupmanagement.md +++ b/docs/features/core/groupmanagement.md @@ -41,11 +41,13 @@ Here is a list of available settings for Group Management. They can be configure Note that all settings are optional and the app will use the documented default settings if they are not used. ```eval_rst -+---------------------------------------------+---------------------------------------------------------------------------+------------+ -| Name | Description | Default | -+=============================================+===========================================================================+============+ -| ``GROUPMANAGEMENT_REQUESTS_NOTIFICATION`` | Send Auth notifications to all group leaders for join and leave requests. | ``False`` | -+---------------------------------------------+---------------------------------------------------------------------------+------------+ ++---------------------------------------------+-------------------------------------------------------------------------------------------+------------+ +| Name | Description | Default | ++=============================================+===========================================================================================+============+ +| ``GROUPMANAGEMENT_AUTO_LEAVE`` | Group members can leave their group without needing confirmation from their group leaders | ``False`` | ++---------------------------------------------+-------------------------------------------------------------------------------------------+------------+ +| ``GROUPMANAGEMENT_REQUESTS_NOTIFICATION`` | Send Auth notifications to all group leaders for join and leave requests. | ``False`` | ++---------------------------------------------+-------------------------------------------------------------------------------------------+------------+ ``` ## Permissions diff --git a/docs/features/core/groups.md b/docs/features/core/groups.md index 936adaff..71fe6469 100644 --- a/docs/features/core/groups.md +++ b/docs/features/core/groups.md @@ -48,12 +48,3 @@ When a user loses this permission, they will be removed from all groups _except_ .. note:: By default, the ``groupmanagement.request_groups`` permission is applied to the ``Member`` group. In most instances this, and perhaps adding it to the ``Blue`` group, should be all that is ever needed. It is unsupported and NOT advisable to apply this permission to a public group. See #697 for more information. ``` - -### Auto Leave - -By default in AA, Both requests and leaves for non-open groups must be approved by a group manager. If you wish to allow users to leave groups without requiring approvals, add the following lines to your `local.py` - -```python -## Allows users to freely leave groups without requiring approval. -AUTO_LEAVE = True -```