How to use AccessControl - 6 common examples

To help you get started, we’ve selected a few AccessControl examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github joaohenriquef / rfid-access-control / server / accesscontrol / services.py View on Github external
def get_current_tag_owner(uid):
    from accesscontrol.models import User
    not_expired_users = User.objects.filter(rfidtaguserlink__expire_date__gte=datetime.date.today())
    never_expire_users = User.objects.filter(rfidtaguserlink__expire_date__isnull=True)
    all_valid_users = not_expired_users | never_expire_users

    print(all_valid_users)
    return all_valid_users.get(rfid_tag__uid=uid.lower())
github joaohenriquef / rfid-access-control / server / accesscontrol / services.py View on Github external
def get_current_tag_owner(uid):
    from accesscontrol.models import User
    not_expired_users = User.objects.filter(rfidtaguserlink__expire_date__gte=datetime.date.today())
    never_expire_users = User.objects.filter(rfidtaguserlink__expire_date__isnull=True)
    all_valid_users = not_expired_users | never_expire_users

    print(all_valid_users)
    return all_valid_users.get(rfid_tag__uid=uid.lower())
github joaohenriquef / rfid-access-control / server / accesscontrol / urls.py View on Github external
from django.urls import path
from accesscontrol import admin
from accesscontrol import views

urlpatterns = [
    path('request-unlock', views.request_unlock),
    path('authenticate', views.authenticate),
    path('authorize-visitor', views.authorize_visitor),
    path('request-front-door-unlock', views.request_front_door_unlock),
]
github joaohenriquef / rfid-access-control / server / accesscontrol / urls.py View on Github external
from django.urls import path
from accesscontrol import admin
from accesscontrol import views

urlpatterns = [
    path('request-unlock', views.request_unlock),
    path('authenticate', views.authenticate),
    path('authorize-visitor', views.authorize_visitor),
    path('request-front-door-unlock', views.request_front_door_unlock),
]
github joaohenriquef / rfid-access-control / server / accesscontrol / urls.py View on Github external
from django.urls import path
from accesscontrol import admin
from accesscontrol import views

urlpatterns = [
    path('request-unlock', views.request_unlock),
    path('authenticate', views.authenticate),
    path('authorize-visitor', views.authorize_visitor),
    path('request-front-door-unlock', views.request_front_door_unlock),
]
github joaohenriquef / rfid-access-control / server / accesscontrol / urls.py View on Github external
from django.urls import path
from accesscontrol import admin
from accesscontrol import views

urlpatterns = [
    path('request-unlock', views.request_unlock),
    path('authenticate', views.authenticate),
    path('authorize-visitor', views.authorize_visitor),
    path('request-front-door-unlock', views.request_front_door_unlock),
]