Skip to content

Commit

Permalink
Merge pull request #1154 from Amsterdam/89544/secura-token-verification
Browse files Browse the repository at this point in the history
89544
  • Loading branch information
remyvdwereld authored Sep 14, 2023
2 parents 312c4ef + 16b6e3b commit 8e5a58b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/apps/users/permissions.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from apps.cases.models import Case
from apps.users.auth_apps import TonKeyAuth, TopKeyAuth
from keycloak_oidc.drf.permissions import IsInAuthorizedRealm
from rest_framework.permissions import BasePermission
from rest_framework.permissions import BasePermission, IsAuthenticated

custom_permissions = [
# Permissions for cases/tasks
Expand Down Expand Up @@ -77,7 +77,8 @@ class CanAccessSensitiveCases(BasePermission):
"""

def has_permission(self, request, view):
return True
# Check if the user is authenticated using IsAuthenticated permission.
return IsAuthenticated().has_permission(request, view)

def has_object_permission(self, request, view, obj):

Expand Down

0 comments on commit 8e5a58b

Please sign in to comment.