|
|
|
# abac/urls.py
|
|
|
|
|
|
|
|
from django.contrib.auth import views as auth_views
|
|
|
|
from django.urls import path
|
|
|
|
|
|
|
|
from .views import (
|
|
|
|
landing_page,
|
|
|
|
login_view,
|
|
|
|
logout_view,
|
|
|
|
upload_file_view,
|
|
|
|
create_user_view,
|
|
|
|
upload_certificate_view,
|
|
|
|
file_detail,
|
|
|
|
create_rule,
|
|
|
|
rule_detail,
|
|
|
|
user_detail_view,
|
|
|
|
delete_rule_attribute,
|
|
|
|
)
|
|
|
|
|
|
|
|
app_name = 'abac'
|
|
|
|
|
|
|
|
urlpatterns = [
|
|
|
|
path('', landing_page, name='home'),
|
|
|
|
path('login/', auth_views.LoginView.as_view(template_name='login.html', success_url='/'), name='login'),
|
|
|
|
path('logout/', logout_view, name='logout'),
|
|
|
|
path('upload-file/', upload_file_view, name='upload_file'),
|
|
|
|
path('create-user/', create_user_view, name='create_user'),
|
|
|
|
path('upload-certificate/', upload_certificate_view, name='upload_certificate'),
|
|
|
|
path('files/<int:file_id>/', file_detail, name='file_detail'),
|
|
|
|
path('files/<int:file_id>/create_rule/', create_rule, name='create_rule'),
|
|
|
|
path('rules/<int:file_id>/<int:rule_id>/',rule_detail, name='rule_detail'),
|
|
|
|
path('user/<str:username>/', user_detail_view, name='user_details'),
|
|
|
|
path('rules/<int:file_id>/<int:rule_id>/delete/<int:rule_attribute_id>/', delete_rule_attribute, name='delete_rule_attribute'),
|
|
|
|
]
|