Commit 942f16a3 authored by Valentin Samir's avatar Valentin Samir

list_display for User admin model

parent 365cfd42
......@@ -43,6 +43,7 @@ class UserAdmin(admin.ModelAdmin):
inlines = (ServiceTicketInline, ProxyTicketInline, ProxyGrantingInline)
readonly_fields=('username', 'date', "session_key")
fields = ('username', 'date', "session_key")
list_display = ('username', 'date', "session_key")
class UsernamesInline(admin.TabularInline):
"""`Username` in admin interface"""
......
......@@ -367,7 +367,8 @@ class Ticket(models.Model):
def logout(self, request, session):
"""Send a SLO request to the ticket service"""
if (self.validate or isinstance(self, ProxyGrantingTicket)) and self.single_log_out:
xml = u"""<samlp:LogoutRequest xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"
try:
xml = u"""<samlp:LogoutRequest xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"
ID="%(id)s" Version="2.0" IssueInstant="%(datetime)s">
<saml:NameID xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"></saml:NameID>
<samlp:SessionIndex>%(ticket)s</samlp:SessionIndex>
......@@ -377,7 +378,6 @@ class Ticket(models.Model):
'datetime' : timezone.now().isoformat(),
'ticket': self.value
}
try:
if self.service_pattern.single_log_out_callback:
url = self.service_pattern.single_log_out_callback
else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment