def METHOD_NAME(self, request):
    UserMiddleware.set_current_user(request.user)
    from_teams = [x.role for x in Team.objects.filter(users=request.user)]
    role_dba = Role.objects.get(name='role_dba')
    if role_dba in from_teams:
        return render(request, 'databases/index.html', {"has_perm": True})