add download credential
This commit is contained in:
parent
f00285624f
commit
f7f13bbea7
|
@ -33,7 +33,7 @@ from idhub.models import (
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
class AdminDashboardView(AdminView, TemplateView):
|
class DashboardView(AdminView, TemplateView):
|
||||||
template_name = "idhub/admin/dashboard.html"
|
template_name = "idhub/admin/dashboard.html"
|
||||||
title = _('Dashboard')
|
title = _('Dashboard')
|
||||||
subtitle = _('Success')
|
subtitle = _('Success')
|
||||||
|
@ -65,7 +65,7 @@ class ImportExport(AdminView, TemplateView):
|
||||||
section = "ImportExport"
|
section = "ImportExport"
|
||||||
|
|
||||||
|
|
||||||
class AdminPeopleListView(People, TemplateView):
|
class PeopleListView(People, TemplateView):
|
||||||
template_name = "idhub/admin/people.html"
|
template_name = "idhub/admin/people.html"
|
||||||
subtitle = _('People list')
|
subtitle = _('People list')
|
||||||
icon = 'bi bi-person'
|
icon = 'bi bi-person'
|
||||||
|
@ -78,7 +78,7 @@ class AdminPeopleListView(People, TemplateView):
|
||||||
return context
|
return context
|
||||||
|
|
||||||
|
|
||||||
class AdminPeopleView(People, TemplateView):
|
class PeopleView(People, TemplateView):
|
||||||
template_name = "idhub/admin/user.html"
|
template_name = "idhub/admin/user.html"
|
||||||
subtitle = _('User Profile')
|
subtitle = _('User Profile')
|
||||||
icon = 'bi bi-person'
|
icon = 'bi bi-person'
|
||||||
|
@ -97,7 +97,7 @@ class AdminPeopleView(People, TemplateView):
|
||||||
return context
|
return context
|
||||||
|
|
||||||
|
|
||||||
class AdminPeopleActivateView(AdminPeopleView):
|
class PeopleActivateView(PeopleView):
|
||||||
|
|
||||||
def get(self, request, *args, **kwargs):
|
def get(self, request, *args, **kwargs):
|
||||||
self.pk = kwargs['pk']
|
self.pk = kwargs['pk']
|
||||||
|
@ -116,7 +116,7 @@ class AdminPeopleActivateView(AdminPeopleView):
|
||||||
return redirect('idhub:admin_people', self.object.id)
|
return redirect('idhub:admin_people', self.object.id)
|
||||||
|
|
||||||
|
|
||||||
class AdminPeopleDeleteView(AdminPeopleView):
|
class PeopleDeleteView(PeopleView):
|
||||||
|
|
||||||
def get(self, request, *args, **kwargs):
|
def get(self, request, *args, **kwargs):
|
||||||
self.pk = kwargs['pk']
|
self.pk = kwargs['pk']
|
||||||
|
@ -129,13 +129,13 @@ class AdminPeopleDeleteView(AdminPeopleView):
|
||||||
|
|
||||||
return redirect('idhub:admin_people_list')
|
return redirect('idhub:admin_people_list')
|
||||||
|
|
||||||
class AdminPeopleEditView(AdminPeopleView, UpdateView):
|
class PeopleEditView(PeopleView, UpdateView):
|
||||||
template_name = "idhub/admin/user_edit.html"
|
template_name = "idhub/admin/user_edit.html"
|
||||||
fields = ('first_name', 'last_name', 'email')
|
fields = ('first_name', 'last_name', 'email')
|
||||||
success_url = reverse_lazy('idhub:admin_people_list')
|
success_url = reverse_lazy('idhub:admin_people_list')
|
||||||
|
|
||||||
|
|
||||||
class AdminPeopleRegisterView(NotifyActivateUserByEmail, People, CreateView):
|
class PeopleRegisterView(NotifyActivateUserByEmail, People, CreateView):
|
||||||
template_name = "idhub/admin/people_register.html"
|
template_name = "idhub/admin/people_register.html"
|
||||||
subtitle = _('People Register')
|
subtitle = _('People Register')
|
||||||
icon = 'bi bi-person'
|
icon = 'bi bi-person'
|
||||||
|
@ -161,7 +161,7 @@ class AdminPeopleRegisterView(NotifyActivateUserByEmail, People, CreateView):
|
||||||
return super().form_valid(form)
|
return super().form_valid(form)
|
||||||
|
|
||||||
|
|
||||||
class AdminPeopleMembershipRegisterView(People, CreateView):
|
class PeopleMembershipRegisterView(People, CreateView):
|
||||||
template_name = "idhub/admin/people_membership_register.html"
|
template_name = "idhub/admin/people_membership_register.html"
|
||||||
subtitle = _('People add membership')
|
subtitle = _('People add membership')
|
||||||
icon = 'bi bi-person'
|
icon = 'bi bi-person'
|
||||||
|
@ -198,7 +198,7 @@ class AdminPeopleMembershipRegisterView(People, CreateView):
|
||||||
return self.success_url
|
return self.success_url
|
||||||
|
|
||||||
|
|
||||||
class AdminPeopleMembershipEditView(People, CreateView):
|
class PeopleMembershipEditView(People, CreateView):
|
||||||
template_name = "idhub/admin/people_membership_register.html"
|
template_name = "idhub/admin/people_membership_register.html"
|
||||||
subtitle = _('People add membership')
|
subtitle = _('People add membership')
|
||||||
icon = 'bi bi-person'
|
icon = 'bi bi-person'
|
||||||
|
@ -220,7 +220,7 @@ class AdminPeopleMembershipEditView(People, CreateView):
|
||||||
return kwargs
|
return kwargs
|
||||||
|
|
||||||
|
|
||||||
class AdminPeopleMembershipDeleteView(AdminPeopleView):
|
class PeopleMembershipDeleteView(PeopleView):
|
||||||
model = Membership
|
model = Membership
|
||||||
|
|
||||||
def get(self, request, *args, **kwargs):
|
def get(self, request, *args, **kwargs):
|
||||||
|
@ -236,7 +236,7 @@ class AdminPeopleMembershipDeleteView(AdminPeopleView):
|
||||||
return redirect('idhub:admin_people_edit', user.id)
|
return redirect('idhub:admin_people_edit', user.id)
|
||||||
|
|
||||||
|
|
||||||
class AdminPeopleRolRegisterView(People, CreateView):
|
class PeopleRolRegisterView(People, CreateView):
|
||||||
template_name = "idhub/admin/people_rol_register.html"
|
template_name = "idhub/admin/people_rol_register.html"
|
||||||
subtitle = _('Add Rol to User')
|
subtitle = _('Add Rol to User')
|
||||||
icon = 'bi bi-person'
|
icon = 'bi bi-person'
|
||||||
|
@ -266,7 +266,7 @@ class AdminPeopleRolRegisterView(People, CreateView):
|
||||||
return self.success_url
|
return self.success_url
|
||||||
|
|
||||||
|
|
||||||
class AdminPeopleRolEditView(People, CreateView):
|
class PeopleRolEditView(People, CreateView):
|
||||||
template_name = "idhub/admin/people_rol_register.html"
|
template_name = "idhub/admin/people_rol_register.html"
|
||||||
subtitle = _('Edit Rol to User')
|
subtitle = _('Edit Rol to User')
|
||||||
icon = 'bi bi-person'
|
icon = 'bi bi-person'
|
||||||
|
@ -288,7 +288,7 @@ class AdminPeopleRolEditView(People, CreateView):
|
||||||
return self.success_url
|
return self.success_url
|
||||||
|
|
||||||
|
|
||||||
class AdminPeopleRolDeleteView(AdminPeopleView):
|
class PeopleRolDeleteView(PeopleView):
|
||||||
model = UserRol
|
model = UserRol
|
||||||
|
|
||||||
def get(self, request, *args, **kwargs):
|
def get(self, request, *args, **kwargs):
|
||||||
|
@ -301,7 +301,7 @@ class AdminPeopleRolDeleteView(AdminPeopleView):
|
||||||
return redirect('idhub:admin_people_edit', user.id)
|
return redirect('idhub:admin_people_edit', user.id)
|
||||||
|
|
||||||
|
|
||||||
class AdminRolesView(AccessControl):
|
class RolesView(AccessControl):
|
||||||
template_name = "idhub/admin/roles.html"
|
template_name = "idhub/admin/roles.html"
|
||||||
subtitle = _('Roles Management')
|
subtitle = _('Roles Management')
|
||||||
icon = ''
|
icon = ''
|
||||||
|
@ -313,7 +313,7 @@ class AdminRolesView(AccessControl):
|
||||||
})
|
})
|
||||||
return context
|
return context
|
||||||
|
|
||||||
class AdminRolRegisterView(AccessControl, CreateView):
|
class RolRegisterView(AccessControl, CreateView):
|
||||||
template_name = "idhub/admin/rol_register.html"
|
template_name = "idhub/admin/rol_register.html"
|
||||||
subtitle = _('Add Rol')
|
subtitle = _('Add Rol')
|
||||||
icon = ''
|
icon = ''
|
||||||
|
@ -323,7 +323,7 @@ class AdminRolRegisterView(AccessControl, CreateView):
|
||||||
object = None
|
object = None
|
||||||
|
|
||||||
|
|
||||||
class AdminRolEditView(AccessControl, CreateView):
|
class RolEditView(AccessControl, CreateView):
|
||||||
template_name = "idhub/admin/rol_register.html"
|
template_name = "idhub/admin/rol_register.html"
|
||||||
subtitle = _('Edit Rol')
|
subtitle = _('Edit Rol')
|
||||||
icon = ''
|
icon = ''
|
||||||
|
@ -339,7 +339,7 @@ class AdminRolEditView(AccessControl, CreateView):
|
||||||
return kwargs
|
return kwargs
|
||||||
|
|
||||||
|
|
||||||
class AdminRolDeleteView(AccessControl):
|
class RolDeleteView(AccessControl):
|
||||||
model = Rol
|
model = Rol
|
||||||
|
|
||||||
def get(self, request, *args, **kwargs):
|
def get(self, request, *args, **kwargs):
|
||||||
|
@ -350,7 +350,7 @@ class AdminRolDeleteView(AccessControl):
|
||||||
return redirect('idhub:admin_roles')
|
return redirect('idhub:admin_roles')
|
||||||
|
|
||||||
|
|
||||||
class AdminServicesView(AccessControl):
|
class ServicesView(AccessControl):
|
||||||
template_name = "idhub/admin/services.html"
|
template_name = "idhub/admin/services.html"
|
||||||
subtitle = _('Service Management')
|
subtitle = _('Service Management')
|
||||||
icon = ''
|
icon = ''
|
||||||
|
@ -362,7 +362,7 @@ class AdminServicesView(AccessControl):
|
||||||
})
|
})
|
||||||
return context
|
return context
|
||||||
|
|
||||||
class AdminServiceRegisterView(AccessControl, CreateView):
|
class ServiceRegisterView(AccessControl, CreateView):
|
||||||
template_name = "idhub/admin/service_register.html"
|
template_name = "idhub/admin/service_register.html"
|
||||||
subtitle = _('Add Service')
|
subtitle = _('Add Service')
|
||||||
icon = ''
|
icon = ''
|
||||||
|
@ -372,7 +372,7 @@ class AdminServiceRegisterView(AccessControl, CreateView):
|
||||||
object = None
|
object = None
|
||||||
|
|
||||||
|
|
||||||
class AdminServiceEditView(AccessControl, CreateView):
|
class ServiceEditView(AccessControl, CreateView):
|
||||||
template_name = "idhub/admin/service_register.html"
|
template_name = "idhub/admin/service_register.html"
|
||||||
subtitle = _('Edit Service')
|
subtitle = _('Edit Service')
|
||||||
icon = ''
|
icon = ''
|
||||||
|
@ -388,7 +388,7 @@ class AdminServiceEditView(AccessControl, CreateView):
|
||||||
return kwargs
|
return kwargs
|
||||||
|
|
||||||
|
|
||||||
class AdminServiceDeleteView(AccessControl):
|
class ServiceDeleteView(AccessControl):
|
||||||
model = Service
|
model = Service
|
||||||
|
|
||||||
def get(self, request, *args, **kwargs):
|
def get(self, request, *args, **kwargs):
|
||||||
|
@ -399,7 +399,7 @@ class AdminServiceDeleteView(AccessControl):
|
||||||
return redirect('idhub:admin_services')
|
return redirect('idhub:admin_services')
|
||||||
|
|
||||||
|
|
||||||
class AdminCredentialsView(Credentials):
|
class CredentialsView(Credentials):
|
||||||
template_name = "idhub/admin/credentials.html"
|
template_name = "idhub/admin/credentials.html"
|
||||||
subtitle = _('Credentials list')
|
subtitle = _('Credentials list')
|
||||||
icon = ''
|
icon = ''
|
||||||
|
@ -412,7 +412,7 @@ class AdminCredentialsView(Credentials):
|
||||||
return context
|
return context
|
||||||
|
|
||||||
|
|
||||||
class AdminCredentialView(Credentials):
|
class CredentialView(Credentials):
|
||||||
template_name = "idhub/admin/issue_credentials.html"
|
template_name = "idhub/admin/issue_credentials.html"
|
||||||
subtitle = _('Change status of Credential')
|
subtitle = _('Change status of Credential')
|
||||||
icon = ''
|
icon = ''
|
||||||
|
@ -431,13 +431,26 @@ class AdminCredentialView(Credentials):
|
||||||
return context
|
return context
|
||||||
|
|
||||||
|
|
||||||
class AdminRevokeCredentialsView(Credentials):
|
class CredentialJsonView(Credentials):
|
||||||
|
|
||||||
|
def get(self, request, *args, **kwargs):
|
||||||
|
pk = kwargs['pk']
|
||||||
|
self.object = get_object_or_404(
|
||||||
|
VerificableCredential,
|
||||||
|
pk=pk,
|
||||||
|
)
|
||||||
|
response = HttpResponse(self.object.data, content_type="application/json")
|
||||||
|
response['Content-Disposition'] = 'attachment; filename={}'.format("credential.json")
|
||||||
|
return response
|
||||||
|
|
||||||
|
|
||||||
|
class RevokeCredentialsView(Credentials):
|
||||||
template_name = "idhub/admin/revoke_credentials.html"
|
template_name = "idhub/admin/revoke_credentials.html"
|
||||||
subtitle = _('Revoke Credentials')
|
subtitle = _('Revoke Credentials')
|
||||||
icon = ''
|
icon = ''
|
||||||
|
|
||||||
|
|
||||||
class AdminDidsView(Credentials):
|
class DidsView(Credentials):
|
||||||
template_name = "idhub/admin/dids.html"
|
template_name = "idhub/admin/dids.html"
|
||||||
subtitle = _('Organization Identities (DID)')
|
subtitle = _('Organization Identities (DID)')
|
||||||
icon = 'bi bi-patch-check-fill'
|
icon = 'bi bi-patch-check-fill'
|
||||||
|
@ -450,7 +463,7 @@ class AdminDidsView(Credentials):
|
||||||
})
|
})
|
||||||
return context
|
return context
|
||||||
|
|
||||||
class AdminDidRegisterView(Credentials, CreateView):
|
class DidRegisterView(Credentials, CreateView):
|
||||||
template_name = "idhub/admin/did_register.html"
|
template_name = "idhub/admin/did_register.html"
|
||||||
subtitle = _('Add a new Organization Identities (DID)')
|
subtitle = _('Add a new Organization Identities (DID)')
|
||||||
icon = 'bi bi-patch-check-fill'
|
icon = 'bi bi-patch-check-fill'
|
||||||
|
@ -468,7 +481,7 @@ class AdminDidRegisterView(Credentials, CreateView):
|
||||||
return super().form_valid(form)
|
return super().form_valid(form)
|
||||||
|
|
||||||
|
|
||||||
class AdminDidEditView(Credentials, UpdateView):
|
class DidEditView(Credentials, UpdateView):
|
||||||
template_name = "idhub/admin/did_register.html"
|
template_name = "idhub/admin/did_register.html"
|
||||||
subtitle = _('Organization Identities (DID)')
|
subtitle = _('Organization Identities (DID)')
|
||||||
icon = 'bi bi-patch-check-fill'
|
icon = 'bi bi-patch-check-fill'
|
||||||
|
@ -488,7 +501,7 @@ class AdminDidEditView(Credentials, UpdateView):
|
||||||
return super().form_valid(form)
|
return super().form_valid(form)
|
||||||
|
|
||||||
|
|
||||||
class AdminDidDeleteView(Credentials, DeleteView):
|
class DidDeleteView(Credentials, DeleteView):
|
||||||
subtitle = _('Organization Identities (DID)')
|
subtitle = _('Organization Identities (DID)')
|
||||||
icon = 'bi bi-patch-check-fill'
|
icon = 'bi bi-patch-check-fill'
|
||||||
wallet = True
|
wallet = True
|
||||||
|
@ -504,21 +517,21 @@ class AdminDidDeleteView(Credentials, DeleteView):
|
||||||
return redirect(self.success_url)
|
return redirect(self.success_url)
|
||||||
|
|
||||||
|
|
||||||
class AdminWalletCredentialsView(Credentials):
|
class WalletCredentialsView(Credentials):
|
||||||
template_name = "idhub/admin/wallet_credentials.html"
|
template_name = "idhub/admin/wallet_credentials.html"
|
||||||
subtitle = _('Credentials')
|
subtitle = _('Credentials')
|
||||||
icon = 'bi bi-patch-check-fill'
|
icon = 'bi bi-patch-check-fill'
|
||||||
wallet = True
|
wallet = True
|
||||||
|
|
||||||
|
|
||||||
class AdminWalletConfigIssuesView(Credentials):
|
class WalletConfigIssuesView(Credentials):
|
||||||
template_name = "idhub/admin/wallet_issues.html"
|
template_name = "idhub/admin/wallet_issues.html"
|
||||||
subtitle = _('Configure Issues')
|
subtitle = _('Configure Issues')
|
||||||
icon = 'bi bi-patch-check-fill'
|
icon = 'bi bi-patch-check-fill'
|
||||||
wallet = True
|
wallet = True
|
||||||
|
|
||||||
|
|
||||||
class AdminSchemasView(SchemasMix):
|
class SchemasView(SchemasMix):
|
||||||
template_name = "idhub/admin/schemas.html"
|
template_name = "idhub/admin/schemas.html"
|
||||||
subtitle = _('Template List')
|
subtitle = _('Template List')
|
||||||
icon = ''
|
icon = ''
|
||||||
|
@ -531,7 +544,7 @@ class AdminSchemasView(SchemasMix):
|
||||||
return context
|
return context
|
||||||
|
|
||||||
|
|
||||||
class AdminSchemasDeleteView(SchemasMix):
|
class SchemasDeleteView(SchemasMix):
|
||||||
|
|
||||||
def get(self, request, *args, **kwargs):
|
def get(self, request, *args, **kwargs):
|
||||||
self.pk = kwargs['pk']
|
self.pk = kwargs['pk']
|
||||||
|
@ -541,7 +554,7 @@ class AdminSchemasDeleteView(SchemasMix):
|
||||||
return redirect('idhub:admin_schemas')
|
return redirect('idhub:admin_schemas')
|
||||||
|
|
||||||
|
|
||||||
class AdminSchemasDownloadView(SchemasMix):
|
class SchemasDownloadView(SchemasMix):
|
||||||
|
|
||||||
def get(self, request, *args, **kwargs):
|
def get(self, request, *args, **kwargs):
|
||||||
self.pk = kwargs['pk']
|
self.pk = kwargs['pk']
|
||||||
|
@ -552,7 +565,7 @@ class AdminSchemasDownloadView(SchemasMix):
|
||||||
return response
|
return response
|
||||||
|
|
||||||
|
|
||||||
class AdminSchemasNewView(SchemasMix):
|
class SchemasNewView(SchemasMix):
|
||||||
template_name = "idhub/admin/schemas_new.html"
|
template_name = "idhub/admin/schemas_new.html"
|
||||||
subtitle = _('Upload Template')
|
subtitle = _('Upload Template')
|
||||||
icon = ''
|
icon = ''
|
||||||
|
@ -597,7 +610,7 @@ class AdminSchemasNewView(SchemasMix):
|
||||||
return schema
|
return schema
|
||||||
|
|
||||||
|
|
||||||
class AdminSchemasImportView(SchemasMix):
|
class SchemasImportView(SchemasMix):
|
||||||
template_name = "idhub/admin/schemas_import.html"
|
template_name = "idhub/admin/schemas_import.html"
|
||||||
subtitle = _('Import Template')
|
subtitle = _('Import Template')
|
||||||
icon = ''
|
icon = ''
|
||||||
|
@ -616,7 +629,7 @@ class AdminSchemasImportView(SchemasMix):
|
||||||
return schemas
|
return schemas
|
||||||
|
|
||||||
|
|
||||||
class AdminSchemasImportAddView(SchemasMix):
|
class SchemasImportAddView(SchemasMix):
|
||||||
|
|
||||||
def get(self, request, *args, **kwargs):
|
def get(self, request, *args, **kwargs):
|
||||||
file_name = kwargs['file_schema']
|
file_name = kwargs['file_schema']
|
||||||
|
@ -650,7 +663,7 @@ class AdminSchemasImportAddView(SchemasMix):
|
||||||
return data
|
return data
|
||||||
|
|
||||||
|
|
||||||
class AdminImportView(ImportExport):
|
class ImportView(ImportExport):
|
||||||
template_name = "idhub/admin/import.html"
|
template_name = "idhub/admin/import.html"
|
||||||
subtitle = _('Import')
|
subtitle = _('Import')
|
||||||
icon = ''
|
icon = ''
|
||||||
|
@ -663,7 +676,7 @@ class AdminImportView(ImportExport):
|
||||||
return context
|
return context
|
||||||
|
|
||||||
|
|
||||||
class AdminImportStep2View(ImportExport):
|
class ImportStep2View(ImportExport):
|
||||||
template_name = "idhub/admin/import_step2.html"
|
template_name = "idhub/admin/import_step2.html"
|
||||||
subtitle = _('Import')
|
subtitle = _('Import')
|
||||||
icon = ''
|
icon = ''
|
||||||
|
@ -676,7 +689,7 @@ class AdminImportStep2View(ImportExport):
|
||||||
return context
|
return context
|
||||||
|
|
||||||
|
|
||||||
class AdminImportStep3View(ImportExport):
|
class ImportStep3View(ImportExport):
|
||||||
template_name = "idhub/admin/import_step3.html"
|
template_name = "idhub/admin/import_step3.html"
|
||||||
subtitle = _('Import')
|
subtitle = _('Import')
|
||||||
icon = ''
|
icon = ''
|
||||||
|
|
|
@ -48,7 +48,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="row mt-3">
|
<div class="row mt-3">
|
||||||
<div class="col text-center">
|
<div class="col text-center">
|
||||||
<a class="btn btn-green-user" href="{% url 'idhub:user_credential_json' object.id %}">{% trans 'View in JSON format' %}</a>
|
<a class="btn btn-green-admin" href="{% url 'idhub:admin_credential_json' object.id %}">{% trans 'View in JSON format' %}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
108
idhub/urls.py
108
idhub/urls.py
|
@ -59,114 +59,116 @@ urlpatterns = [
|
||||||
),
|
),
|
||||||
|
|
||||||
# User
|
# User
|
||||||
path('user/dashboard/', views_user.UserDashboardView.as_view(),
|
path('user/dashboard/', views_user.DashboardView.as_view(),
|
||||||
name='user_dashboard'),
|
name='user_dashboard'),
|
||||||
path('user/profile/', views_user.UserProfileView.as_view(),
|
path('user/profile/', views_user.ProfileView.as_view(),
|
||||||
name='user_profile'),
|
name='user_profile'),
|
||||||
path('user/roles/', views_user.UserRolesView.as_view(),
|
path('user/roles/', views_user.RolesView.as_view(),
|
||||||
name='user_roles'),
|
name='user_roles'),
|
||||||
path('user/gdpr/', views_user.UserGDPRView.as_view(),
|
path('user/gdpr/', views_user.GDPRView.as_view(),
|
||||||
name='user_gdpr'),
|
name='user_gdpr'),
|
||||||
path('user/identities/', views_user.UserDidsView.as_view(),
|
path('user/identities/', views_user.DidsView.as_view(),
|
||||||
name='user_dids'),
|
name='user_dids'),
|
||||||
path('user/dids/new/', views_user.UserDidRegisterView.as_view(),
|
path('user/dids/new/', views_user.DidRegisterView.as_view(),
|
||||||
name='user_dids_new'),
|
name='user_dids_new'),
|
||||||
path('user/dids/<int:pk>/', views_user.UserDidEditView.as_view(),
|
path('user/dids/<int:pk>/', views_user.DidEditView.as_view(),
|
||||||
name='user_dids_edit'),
|
name='user_dids_edit'),
|
||||||
path('user/dids/<int:pk>/del/', views_user.UserDidDeleteView.as_view(),
|
path('user/dids/<int:pk>/del/', views_user.DidDeleteView.as_view(),
|
||||||
name='user_dids_del'),
|
name='user_dids_del'),
|
||||||
path('user/credentials/', views_user.UserCredentialsView.as_view(),
|
path('user/credentials/', views_user.CredentialsView.as_view(),
|
||||||
name='user_credentials'),
|
name='user_credentials'),
|
||||||
path('user/credentials/<int:pk>', views_user.UserCredentialView.as_view(),
|
path('user/credentials/<int:pk>', views_user.CredentialView.as_view(),
|
||||||
name='user_credential'),
|
name='user_credential'),
|
||||||
path('user/credentials/<int:pk>/json', views_user.UserCredentialJsonView.as_view(),
|
path('user/credentials/<int:pk>/json', views_user.CredentialJsonView.as_view(),
|
||||||
name='user_credential_json'),
|
name='user_credential_json'),
|
||||||
path('user/credentials/request/',
|
path('user/credentials/request/',
|
||||||
views_user.UserCredentialsRequestView.as_view(),
|
views_user.CredentialsRequestView.as_view(),
|
||||||
name='user_credentials_request'),
|
name='user_credentials_request'),
|
||||||
path('user/credentials_presentation/',
|
path('user/credentials_presentation/',
|
||||||
views_user.UserCredentialsPresentationView.as_view(),
|
views_user.CredentialsPresentationView.as_view(),
|
||||||
name='user_credentials_presentation'),
|
name='user_credentials_presentation'),
|
||||||
|
|
||||||
# Admin
|
# Admin
|
||||||
path('admin/dashboard/', views_admin.AdminDashboardView.as_view(),
|
path('admin/dashboard/', views_admin.DashboardView.as_view(),
|
||||||
name='admin_dashboard'),
|
name='admin_dashboard'),
|
||||||
path('admin/people/', views_admin.AdminPeopleListView.as_view(),
|
path('admin/people/', views_admin.PeopleListView.as_view(),
|
||||||
name='admin_people_list'),
|
name='admin_people_list'),
|
||||||
path('admin/people/<int:pk>', views_admin.AdminPeopleView.as_view(),
|
path('admin/people/<int:pk>', views_admin.PeopleView.as_view(),
|
||||||
name='admin_people'),
|
name='admin_people'),
|
||||||
path('admin/people/<int:pk>/edit', views_admin.AdminPeopleEditView.as_view(),
|
path('admin/people/<int:pk>/edit', views_admin.PeopleEditView.as_view(),
|
||||||
name='admin_people_edit'),
|
name='admin_people_edit'),
|
||||||
path('admin/people/<int:pk>/del', views_admin.AdminPeopleDeleteView.as_view(),
|
path('admin/people/<int:pk>/del', views_admin.PeopleDeleteView.as_view(),
|
||||||
name='admin_people_delete'),
|
name='admin_people_delete'),
|
||||||
path('admin/people/<int:pk>/activate', views_admin.AdminPeopleActivateView.as_view(),
|
path('admin/people/<int:pk>/activate', views_admin.PeopleActivateView.as_view(),
|
||||||
name='admin_people_activate'),
|
name='admin_people_activate'),
|
||||||
path('admin/people/new/', views_admin.AdminPeopleRegisterView.as_view(),
|
path('admin/people/new/', views_admin.PeopleRegisterView.as_view(),
|
||||||
name='admin_people_new'),
|
name='admin_people_new'),
|
||||||
path('admin/people/<int:pk>/membership/new/', views_admin.AdminPeopleMembershipRegisterView.as_view(),
|
path('admin/people/<int:pk>/membership/new/', views_admin.PeopleMembershipRegisterView.as_view(),
|
||||||
name='admin_people_membership_new'),
|
name='admin_people_membership_new'),
|
||||||
path('admin/membership/<int:pk>/edit/', views_admin.AdminPeopleMembershipEditView.as_view(),
|
path('admin/membership/<int:pk>/edit/', views_admin.PeopleMembershipEditView.as_view(),
|
||||||
name='admin_people_membership_edit'),
|
name='admin_people_membership_edit'),
|
||||||
path('admin/membership/<int:pk>/del/', views_admin.AdminPeopleMembershipDeleteView.as_view(),
|
path('admin/membership/<int:pk>/del/', views_admin.PeopleMembershipDeleteView.as_view(),
|
||||||
name='admin_people_membership_del'),
|
name='admin_people_membership_del'),
|
||||||
path('admin/people/<int:pk>/rol/new/', views_admin.AdminPeopleRolRegisterView.as_view(),
|
path('admin/people/<int:pk>/rol/new/', views_admin.PeopleRolRegisterView.as_view(),
|
||||||
name='admin_people_rol_new'),
|
name='admin_people_rol_new'),
|
||||||
path('admin/people/<int:pk>/rol/edit/', views_admin.AdminPeopleRolEditView.as_view(),
|
path('admin/people/<int:pk>/rol/edit/', views_admin.PeopleRolEditView.as_view(),
|
||||||
name='admin_people_rol_edit'),
|
name='admin_people_rol_edit'),
|
||||||
path('admin/people/<int:pk>/rol/del/', views_admin.AdminPeopleRolDeleteView.as_view(),
|
path('admin/people/<int:pk>/rol/del/', views_admin.PeopleRolDeleteView.as_view(),
|
||||||
name='admin_people_rol_del'),
|
name='admin_people_rol_del'),
|
||||||
path('admin/roles/', views_admin.AdminRolesView.as_view(),
|
path('admin/roles/', views_admin.RolesView.as_view(),
|
||||||
name='admin_roles'),
|
name='admin_roles'),
|
||||||
path('admin/roles/new', views_admin.AdminRolRegisterView.as_view(),
|
path('admin/roles/new', views_admin.RolRegisterView.as_view(),
|
||||||
name='admin_rol_new'),
|
name='admin_rol_new'),
|
||||||
path('admin/roles/<int:pk>', views_admin.AdminRolEditView.as_view(),
|
path('admin/roles/<int:pk>', views_admin.RolEditView.as_view(),
|
||||||
name='admin_rol_edit'),
|
name='admin_rol_edit'),
|
||||||
path('admin/roles/<int:pk>/del', views_admin.AdminRolDeleteView.as_view(),
|
path('admin/roles/<int:pk>/del', views_admin.RolDeleteView.as_view(),
|
||||||
name='admin_rol_del'),
|
name='admin_rol_del'),
|
||||||
path('admin/services/', views_admin.AdminServicesView.as_view(),
|
path('admin/services/', views_admin.ServicesView.as_view(),
|
||||||
name='admin_services'),
|
name='admin_services'),
|
||||||
path('admin/services/new', views_admin.AdminServiceRegisterView.as_view(),
|
path('admin/services/new', views_admin.ServiceRegisterView.as_view(),
|
||||||
name='admin_service_new'),
|
name='admin_service_new'),
|
||||||
path('admin/services/<int:pk>', views_admin.AdminServiceEditView.as_view(),
|
path('admin/services/<int:pk>', views_admin.ServiceEditView.as_view(),
|
||||||
name='admin_service_edit'),
|
name='admin_service_edit'),
|
||||||
path('admin/services/<int:pk>/del', views_admin.AdminServiceDeleteView.as_view(),
|
path('admin/services/<int:pk>/del', views_admin.ServiceDeleteView.as_view(),
|
||||||
name='admin_service_del'),
|
name='admin_service_del'),
|
||||||
path('admin/credentials/', views_admin.AdminCredentialsView.as_view(),
|
path('admin/credentials/', views_admin.CredentialsView.as_view(),
|
||||||
name='admin_credentials'),
|
name='admin_credentials'),
|
||||||
path('admin/credentials/<int:pk>/', views_admin.AdminCredentialView.as_view(),
|
path('admin/credentials/<int:pk>/', views_admin.CredentialView.as_view(),
|
||||||
name='admin_credential'),
|
name='admin_credential'),
|
||||||
path('admin/credentials/revoke/', views_admin.AdminRevokeCredentialsView.as_view(),
|
path('admin/credentials/<int:pk>/json', views_admin.CredentialJsonView.as_view(),
|
||||||
|
name='admin_credential_json'),
|
||||||
|
path('admin/credentials/revoke/', views_admin.RevokeCredentialsView.as_view(),
|
||||||
name='admin_credentials_revoke'),
|
name='admin_credentials_revoke'),
|
||||||
path('admin/wallet/identities/', views_admin.AdminDidsView.as_view(),
|
path('admin/wallet/identities/', views_admin.DidsView.as_view(),
|
||||||
name='admin_dids'),
|
name='admin_dids'),
|
||||||
path('admin/dids/new/', views_admin.AdminDidRegisterView.as_view(),
|
path('admin/dids/new/', views_admin.DidRegisterView.as_view(),
|
||||||
name='admin_dids_new'),
|
name='admin_dids_new'),
|
||||||
path('admin/dids/<int:pk>/', views_admin.AdminDidEditView.as_view(),
|
path('admin/dids/<int:pk>/', views_admin.DidEditView.as_view(),
|
||||||
name='admin_dids_edit'),
|
name='admin_dids_edit'),
|
||||||
path('admin/dids/<int:pk>/del/', views_admin.AdminDidDeleteView.as_view(),
|
path('admin/dids/<int:pk>/del/', views_admin.DidDeleteView.as_view(),
|
||||||
name='admin_dids_del'),
|
name='admin_dids_del'),
|
||||||
path('admin/wallet/credentials/', views_admin.AdminWalletCredentialsView.as_view(),
|
path('admin/wallet/credentials/', views_admin.WalletCredentialsView.as_view(),
|
||||||
name='admin_wallet_credentials'),
|
name='admin_wallet_credentials'),
|
||||||
path('admin/wallet/config/issue/', views_admin.AdminWalletConfigIssuesView.as_view(),
|
path('admin/wallet/config/issue/', views_admin.WalletConfigIssuesView.as_view(),
|
||||||
name='admin_wallet_config_issue'),
|
name='admin_wallet_config_issue'),
|
||||||
path('admin/wallet/config/issue/', views_admin.AdminWalletConfigIssuesView.as_view(),
|
path('admin/wallet/config/issue/', views_admin.WalletConfigIssuesView.as_view(),
|
||||||
name='admin_wallet_config_issue'),
|
name='admin_wallet_config_issue'),
|
||||||
path('admin/schemas/', views_admin.AdminSchemasView.as_view(),
|
path('admin/schemas/', views_admin.SchemasView.as_view(),
|
||||||
name='admin_schemas'),
|
name='admin_schemas'),
|
||||||
path('admin/schemas/<int:pk>/del/', views_admin.AdminSchemasDeleteView.as_view(),
|
path('admin/schemas/<int:pk>/del/', views_admin.SchemasDeleteView.as_view(),
|
||||||
name='admin_schemas_del'),
|
name='admin_schemas_del'),
|
||||||
path('admin/schemas/<int:pk>/', views_admin.AdminSchemasDownloadView.as_view(),
|
path('admin/schemas/<int:pk>/', views_admin.SchemasDownloadView.as_view(),
|
||||||
name='admin_schemas_download'),
|
name='admin_schemas_download'),
|
||||||
path('admin/schemas/new', views_admin.AdminSchemasNewView.as_view(),
|
path('admin/schemas/new', views_admin.SchemasNewView.as_view(),
|
||||||
name='admin_schemas_new'),
|
name='admin_schemas_new'),
|
||||||
path('admin/schemas/import', views_admin.AdminSchemasImportView.as_view(),
|
path('admin/schemas/import', views_admin.SchemasImportView.as_view(),
|
||||||
name='admin_schemas_import'),
|
name='admin_schemas_import'),
|
||||||
path('admin/schemas/import/<str:file_schema>', views_admin.AdminSchemasImportAddView.as_view(),
|
path('admin/schemas/import/<str:file_schema>', views_admin.SchemasImportAddView.as_view(),
|
||||||
name='admin_schemas_import_add'),
|
name='admin_schemas_import_add'),
|
||||||
path('admin/import', views_admin.AdminImportView.as_view(),
|
path('admin/import', views_admin.ImportView.as_view(),
|
||||||
name='admin_import'),
|
name='admin_import'),
|
||||||
path('admin/import/new', views_admin.AdminImportStep2View.as_view(),
|
path('admin/import/new', views_admin.ImportStep2View.as_view(),
|
||||||
name='admin_import_step2'),
|
name='admin_import_step2'),
|
||||||
path('admin/import/<int:pk>/', views_admin.AdminImportStep3View.as_view(),
|
path('admin/import/<int:pk>/', views_admin.ImportStep3View.as_view(),
|
||||||
name='admin_import_step3'),
|
name='admin_import_step3'),
|
||||||
]
|
]
|
||||||
|
|
|
@ -28,7 +28,7 @@ class MyWallet(UserView):
|
||||||
section = "MyWallet"
|
section = "MyWallet"
|
||||||
|
|
||||||
|
|
||||||
class UserDashboardView(UserView, TemplateView):
|
class DashboardView(UserView, TemplateView):
|
||||||
template_name = "idhub/user/dashboard.html"
|
template_name = "idhub/user/dashboard.html"
|
||||||
title = _('Dashboard')
|
title = _('Dashboard')
|
||||||
subtitle = _('Success')
|
subtitle = _('Success')
|
||||||
|
@ -36,7 +36,7 @@ class UserDashboardView(UserView, TemplateView):
|
||||||
section = "Home"
|
section = "Home"
|
||||||
|
|
||||||
|
|
||||||
class UserProfileView(MyProfile, UpdateView):
|
class ProfileView(MyProfile, UpdateView):
|
||||||
template_name = "idhub/user/profile.html"
|
template_name = "idhub/user/profile.html"
|
||||||
subtitle = _('My personal Data')
|
subtitle = _('My personal Data')
|
||||||
icon = 'bi bi-person'
|
icon = 'bi bi-person'
|
||||||
|
@ -48,19 +48,19 @@ class UserProfileView(MyProfile, UpdateView):
|
||||||
return self.request.user
|
return self.request.user
|
||||||
|
|
||||||
|
|
||||||
class UserRolesView(MyProfile, TemplateView):
|
class RolesView(MyProfile, TemplateView):
|
||||||
template_name = "idhub/user/roles.html"
|
template_name = "idhub/user/roles.html"
|
||||||
subtitle = _('My roles')
|
subtitle = _('My roles')
|
||||||
icon = 'fa-brands fa-critical-role'
|
icon = 'fa-brands fa-critical-role'
|
||||||
|
|
||||||
|
|
||||||
class UserGDPRView(MyProfile, TemplateView):
|
class GDPRView(MyProfile, TemplateView):
|
||||||
template_name = "idhub/user/gdpr.html"
|
template_name = "idhub/user/gdpr.html"
|
||||||
subtitle = _('GDPR info')
|
subtitle = _('GDPR info')
|
||||||
icon = 'bi bi-file-earmark-medical'
|
icon = 'bi bi-file-earmark-medical'
|
||||||
|
|
||||||
|
|
||||||
class UserCredentialsView(MyWallet, TemplateView):
|
class CredentialsView(MyWallet, TemplateView):
|
||||||
template_name = "idhub/user/credentials.html"
|
template_name = "idhub/user/credentials.html"
|
||||||
subtitle = _('Credentials')
|
subtitle = _('Credentials')
|
||||||
icon = 'bi bi-patch-check-fill'
|
icon = 'bi bi-patch-check-fill'
|
||||||
|
@ -73,7 +73,7 @@ class UserCredentialsView(MyWallet, TemplateView):
|
||||||
return context
|
return context
|
||||||
|
|
||||||
|
|
||||||
class UserCredentialView(MyWallet, TemplateView):
|
class CredentialView(MyWallet, TemplateView):
|
||||||
template_name = "idhub/user/credential.html"
|
template_name = "idhub/user/credential.html"
|
||||||
subtitle = _('Credential')
|
subtitle = _('Credential')
|
||||||
icon = 'bi bi-patch-check-fill'
|
icon = 'bi bi-patch-check-fill'
|
||||||
|
@ -95,7 +95,7 @@ class UserCredentialView(MyWallet, TemplateView):
|
||||||
return context
|
return context
|
||||||
|
|
||||||
|
|
||||||
class UserCredentialJsonView(MyWallet, TemplateView):
|
class CredentialJsonView(MyWallet, TemplateView):
|
||||||
|
|
||||||
def get(self, request, *args, **kwargs):
|
def get(self, request, *args, **kwargs):
|
||||||
pk = kwargs['pk']
|
pk = kwargs['pk']
|
||||||
|
@ -109,7 +109,7 @@ class UserCredentialJsonView(MyWallet, TemplateView):
|
||||||
return response
|
return response
|
||||||
|
|
||||||
|
|
||||||
class UserCredentialsRequestView(MyWallet, FormView):
|
class CredentialsRequestView(MyWallet, FormView):
|
||||||
template_name = "idhub/user/credentials_request.html"
|
template_name = "idhub/user/credentials_request.html"
|
||||||
subtitle = _('Credentials request')
|
subtitle = _('Credentials request')
|
||||||
icon = 'bi bi-patch-check-fill'
|
icon = 'bi bi-patch-check-fill'
|
||||||
|
@ -130,7 +130,7 @@ class UserCredentialsRequestView(MyWallet, FormView):
|
||||||
return super().form_valid(form)
|
return super().form_valid(form)
|
||||||
|
|
||||||
|
|
||||||
class UserCredentialsPresentationView(MyWallet, FormView):
|
class CredentialsPresentationView(MyWallet, FormView):
|
||||||
template_name = "idhub/user/credentials_presentation.html"
|
template_name = "idhub/user/credentials_presentation.html"
|
||||||
subtitle = _('Credentials Presentation')
|
subtitle = _('Credentials Presentation')
|
||||||
icon = 'bi bi-patch-check-fill'
|
icon = 'bi bi-patch-check-fill'
|
||||||
|
@ -151,7 +151,7 @@ class UserCredentialsPresentationView(MyWallet, FormView):
|
||||||
return super().form_valid(form)
|
return super().form_valid(form)
|
||||||
|
|
||||||
|
|
||||||
class UserDidsView(MyWallet, TemplateView):
|
class DidsView(MyWallet, TemplateView):
|
||||||
template_name = "idhub/user/dids.html"
|
template_name = "idhub/user/dids.html"
|
||||||
subtitle = _('Identities (DID)')
|
subtitle = _('Identities (DID)')
|
||||||
icon = 'bi bi-patch-check-fill'
|
icon = 'bi bi-patch-check-fill'
|
||||||
|
@ -164,7 +164,7 @@ class UserDidsView(MyWallet, TemplateView):
|
||||||
return context
|
return context
|
||||||
|
|
||||||
|
|
||||||
class UserDidRegisterView(MyWallet, CreateView):
|
class DidRegisterView(MyWallet, CreateView):
|
||||||
template_name = "idhub/user/did_register.html"
|
template_name = "idhub/user/did_register.html"
|
||||||
subtitle = _('Add a new Identities (DID)')
|
subtitle = _('Add a new Identities (DID)')
|
||||||
icon = 'bi bi-patch-check-fill'
|
icon = 'bi bi-patch-check-fill'
|
||||||
|
@ -189,7 +189,7 @@ class UserDidRegisterView(MyWallet, CreateView):
|
||||||
return super().form_valid(form)
|
return super().form_valid(form)
|
||||||
|
|
||||||
|
|
||||||
class UserDidEditView(MyWallet, UpdateView):
|
class DidEditView(MyWallet, UpdateView):
|
||||||
template_name = "idhub/user/did_register.html"
|
template_name = "idhub/user/did_register.html"
|
||||||
subtitle = _('Identities (DID)')
|
subtitle = _('Identities (DID)')
|
||||||
icon = 'bi bi-patch-check-fill'
|
icon = 'bi bi-patch-check-fill'
|
||||||
|
@ -209,7 +209,7 @@ class UserDidEditView(MyWallet, UpdateView):
|
||||||
return super().form_valid(form)
|
return super().form_valid(form)
|
||||||
|
|
||||||
|
|
||||||
class UserDidDeleteView(MyWallet, DeleteView):
|
class DidDeleteView(MyWallet, DeleteView):
|
||||||
subtitle = _('Identities (DID)')
|
subtitle = _('Identities (DID)')
|
||||||
icon = 'bi bi-patch-check-fill'
|
icon = 'bi bi-patch-check-fill'
|
||||||
wallet = True
|
wallet = True
|
||||||
|
|
Loading…
Reference in New Issue