mirror of
https://github.com/eduardogsilva/wireguard_webadmin.git
synced 2025-07-15 12:54:32 +02:00
Refine enhanced filtering logic in wireguard_status view to ensure it only activates when user has peer groups defined in UserAcl.
This commit is contained in:
parent
b426c05e9f
commit
fd14cf1744
1 changed files with 2 additions and 1 deletions
|
@ -118,7 +118,8 @@ def wireguard_status(request):
|
||||||
|
|
||||||
if request.user.is_authenticated:
|
if request.user.is_authenticated:
|
||||||
user_acl = get_object_or_404(UserAcl, user=request.user)
|
user_acl = get_object_or_404(UserAcl, user=request.user)
|
||||||
enhanced_filter = user_acl.enable_enhanced_filter
|
if user_acl.enable_enhanced_filter and user_acl.peer_groups.count() > 0:
|
||||||
|
enhanced_filter = True
|
||||||
elif request.GET.get('key'):
|
elif request.GET.get('key'):
|
||||||
api_key = get_api_key('api')
|
api_key = get_api_key('api')
|
||||||
if api_key and api_key == request.GET.get('key'):
|
if api_key and api_key == request.GET.get('key'):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue