list_display for User admin model
This commit is contained in:
parent
365cfd4279
commit
942f16a347
@ -43,6 +43,7 @@ class UserAdmin(admin.ModelAdmin):
|
|||||||
inlines = (ServiceTicketInline, ProxyTicketInline, ProxyGrantingInline)
|
inlines = (ServiceTicketInline, ProxyTicketInline, ProxyGrantingInline)
|
||||||
readonly_fields=('username', 'date', "session_key")
|
readonly_fields=('username', 'date', "session_key")
|
||||||
fields = ('username', 'date', "session_key")
|
fields = ('username', 'date', "session_key")
|
||||||
|
list_display = ('username', 'date', "session_key")
|
||||||
|
|
||||||
class UsernamesInline(admin.TabularInline):
|
class UsernamesInline(admin.TabularInline):
|
||||||
"""`Username` in admin interface"""
|
"""`Username` in admin interface"""
|
||||||
|
@ -367,7 +367,8 @@ class Ticket(models.Model):
|
|||||||
def logout(self, request, session):
|
def logout(self, request, session):
|
||||||
"""Send a SLO request to the ticket service"""
|
"""Send a SLO request to the ticket service"""
|
||||||
if (self.validate or isinstance(self, ProxyGrantingTicket)) and self.single_log_out:
|
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">
|
ID="%(id)s" Version="2.0" IssueInstant="%(datetime)s">
|
||||||
<saml:NameID xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"></saml:NameID>
|
<saml:NameID xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"></saml:NameID>
|
||||||
<samlp:SessionIndex>%(ticket)s</samlp:SessionIndex>
|
<samlp:SessionIndex>%(ticket)s</samlp:SessionIndex>
|
||||||
@ -377,7 +378,6 @@ class Ticket(models.Model):
|
|||||||
'datetime' : timezone.now().isoformat(),
|
'datetime' : timezone.now().isoformat(),
|
||||||
'ticket': self.value
|
'ticket': self.value
|
||||||
}
|
}
|
||||||
try:
|
|
||||||
if self.service_pattern.single_log_out_callback:
|
if self.service_pattern.single_log_out_callback:
|
||||||
url = self.service_pattern.single_log_out_callback
|
url = self.service_pattern.single_log_out_callback
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user