Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
django-cas-server
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Samir
django-cas-server
Commits
b0a07efe
Commit
b0a07efe
authored
Jul 04, 2016
by
Valentin Samir
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a display field to Identity Providers
parent
aa433d3c
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
119 additions
and
74 deletions
+119
-74
README.rst
README.rst
+3
-0
cas_server/admin.py
cas_server/admin.py
+2
-1
cas_server/forms.py
cas_server/forms.py
+1
-1
cas_server/locale/en/LC_MESSAGES/django.mo
cas_server/locale/en/LC_MESSAGES/django.mo
+0
-0
cas_server/locale/en/LC_MESSAGES/django.po
cas_server/locale/en/LC_MESSAGES/django.po
+44
-36
cas_server/locale/fr/LC_MESSAGES/django.mo
cas_server/locale/fr/LC_MESSAGES/django.mo
+0
-0
cas_server/locale/fr/LC_MESSAGES/django.po
cas_server/locale/fr/LC_MESSAGES/django.po
+44
-36
cas_server/migrations/0008_federatediendityprovider_display.py
...erver/migrations/0008_federatediendityprovider_display.py
+20
-0
cas_server/models.py
cas_server/models.py
+5
-0
No files found.
README.rst
View file @
b0a07efe
...
...
@@ -354,6 +354,9 @@ An identity provider comes with 5 fields:
* `CAS protocol version`: the version of the CAS protocol to use to contact the identity provider.
The default is version 3.
* `Verbose name`: the name used on the login page to display the identity provider.
* `Display`: a boolean controlling the display of the identity provider on the login page.
Beware that this do not disable the identity provider, it just hide it on the login page.
User will always be able to log in using this provider by fetching `/federate/provider_suffix`.
In federation mode, ``django-cas-server`` build user's username as follow:
...
...
cas_server/admin.py
View file @
b0a07efe
...
...
@@ -93,7 +93,8 @@ class ServicePatternAdmin(admin.ModelAdmin):
class
FederatedIendityProviderAdmin
(
admin
.
ModelAdmin
):
fields
=
(
'pos'
,
'suffix'
,
'server_url'
,
'cas_protocol_version'
,
'verbose_name'
)
fields
=
(
'pos'
,
'suffix'
,
'server_url'
,
'cas_protocol_version'
,
'verbose_name'
,
'display'
)
list_display
=
(
'verbose_name'
,
'suffix'
,
'display'
)
admin
.
site
.
register
(
User
,
UserAdmin
)
...
...
cas_server/forms.py
View file @
b0a07efe
...
...
@@ -34,7 +34,7 @@ class FederateSelect(forms.Form):
allowing the user to choose a identity provider.
"""
provider
=
forms
.
ModelChoiceField
(
queryset
=
models
.
FederatedIendityProvider
.
objects
.
all
(
).
order_by
(
queryset
=
models
.
FederatedIendityProvider
.
objects
.
filter
(
display
=
True
).
order_by
(
"pos"
,
"verbose_name"
,
"suffix"
...
...
cas_server/locale/en/LC_MESSAGES/django.mo
View file @
b0a07efe
No preview for this file type
cas_server/locale/en/LC_MESSAGES/django.po
View file @
b0a07efe
...
...
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: cas_server\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-07-04 17:
15
+0200\n"
"PO-Revision-Date: 2016-07-04 17:
15
+0200\n"
"POT-Creation-Date: 2016-07-04 17:
36
+0200\n"
"PO-Revision-Date: 2016-07-04 17:
39
+0200\n"
"Last-Translator: Valentin Samir <valentin.samir@crans.org>\n"
"Language-Team: django <LL@li.org>\n"
"Language: en\n"
...
...
@@ -104,48 +104,56 @@ msgstr ""
msgid "Name for this identity provider displayed on the login page"
msgstr ""
#: models.py:70 models.py:31
2
#: models.py:70 models.py:31
7
msgid "position"
msgstr "position"
#: models.py:159
#: models.py:80
msgid "display"
msgstr ""
#: models.py:81
msgid "Display the provider on the login page"
msgstr ""
#: models.py:164
msgid "User"
msgstr ""
#: models.py:16
0
#: models.py:16
5
msgid "Users"
msgstr ""
#: models.py:2
29
#: models.py:2
34
#, python-format
msgid "Error during service logout %s"
msgstr "Error during service logout %s"
#: models.py:3
07
#: models.py:3
12
msgid "Service pattern"
msgstr "Service pattern"
#: models.py:3
08
#: models.py:3
13
msgid "Services patterns"
msgstr ""
#: models.py:31
3
#: models.py:31
8
msgid "service patterns are sorted using the position attribute"
msgstr ""
#: models.py:32
0 models.py:444
#: models.py:32
5 models.py:449
msgid "name"
msgstr "name"
#: models.py:32
1
#: models.py:32
6
msgid "A name for the service"
msgstr "A name for the service"
#: models.py:3
26 models.py:473 models.py:492
#: models.py:3
31 models.py:478 models.py:497
msgid "pattern"
msgstr "pattern"
#: models.py:3
28
#: models.py:3
33
msgid ""
"A regular expression matching services. Will usually looks like '^https://"
"some\\.server\\.com/path/.*$'.As it is a regular expression, special "
...
...
@@ -155,73 +163,73 @@ msgstr ""
"some\\.server\\.com/path/.*$'.As it is a regular expression, special "
"character must be escaped with a '\\'."
#: models.py:3
37
#: models.py:3
42
msgid "user field"
msgstr ""
#: models.py:3
38
#: models.py:3
43
msgid "Name of the attribut to transmit as username, empty = login"
msgstr "Name of the attribut to transmit as username, empty = login"
#: models.py:34
2
#: models.py:34
7
msgid "restrict username"
msgstr ""
#: models.py:34
3
#: models.py:34
8
msgid "Limit username allowed to connect to the list provided bellow"
msgstr "Limit username allowed to connect to the list provided bellow"
#: models.py:3
47
#: models.py:3
52
msgid "proxy"
msgstr "proxy"
#: models.py:3
48
#: models.py:3
53
msgid "Proxy tickets can be delivered to the service"
msgstr "Proxy tickets can be delivered to the service"
#: models.py:35
2
#: models.py:35
7
msgid "proxy callback"
msgstr "proxy callback"
#: models.py:35
3
#: models.py:35
8
msgid "can be used as a proxy callback to deliver PGT"
msgstr "can be used as a proxy callback to deliver PGT"
#: models.py:3
57
#: models.py:3
62
msgid "single log out"
msgstr ""
#: models.py:3
58
#: models.py:3
63
msgid "Enable SLO for the service"
msgstr "Enable SLO for the service"
#: models.py:3
65
#: models.py:3
70
msgid "single log out callback"
msgstr ""
#: models.py:3
66
#: models.py:3
71
msgid ""
"URL where the SLO request will be POST. empty = service url\n"
"This is usefull for non HTTP proxied services."
msgstr ""
#: models.py:4
28
#: models.py:4
33
msgid "username"
msgstr ""
#: models.py:4
29
#: models.py:4
34
msgid "username allowed to connect to the service"
msgstr "username allowed to connect to the service"
#: models.py:4
45
#: models.py:4
50
msgid "name of an attribut to send to the service, use * for all attributes"
msgstr "name of an attribut to send to the service, use * for all attributes"
#: models.py:45
0 models.py:498
#: models.py:45
5 models.py:503
msgid "replace"
msgstr "replace"
#: models.py:45
1
#: models.py:45
6
msgid ""
"name under which the attribut will be showto the service. empty = default "
"name of the attribut"
...
...
@@ -229,27 +237,27 @@ msgstr ""
"name under which the attribut will be showto the service. empty = default "
"name of the attribut"
#: models.py:4
68 models.py:487
#: models.py:4
73 models.py:492
msgid "attribut"
msgstr "attribut"
#: models.py:4
69
#: models.py:4
74
msgid "Name of the attribut which must verify pattern"
msgstr "Name of the attribut which must verify pattern"
#: models.py:47
4
#: models.py:47
9
msgid "a regular expression"
msgstr "a regular expression"
#: models.py:4
88
#: models.py:4
93
msgid "Name of the attribut for which the value must be replace"
msgstr "Name of the attribut for which the value must be replace"
#: models.py:49
3
#: models.py:49
8
msgid "An regular expression maching whats need to be replaced"
msgstr "An regular expression maching whats need to be replaced"
#: models.py:
499
#: models.py:
504
msgid "replace expression, groups are capture by \\1, \\2 …"
msgstr "replace expression, groups are capture by \\1, \\2 …"
...
...
cas_server/locale/fr/LC_MESSAGES/django.mo
View file @
b0a07efe
No preview for this file type
cas_server/locale/fr/LC_MESSAGES/django.po
View file @
b0a07efe
...
...
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: cas_server\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-07-04 17:
15
+0200\n"
"PO-Revision-Date: 2016-07-04 17:
21
+0200\n"
"POT-Creation-Date: 2016-07-04 17:
36
+0200\n"
"PO-Revision-Date: 2016-07-04 17:
37
+0200\n"
"Last-Translator: Valentin Samir <valentin.samir@crans.org>\n"
"Language-Team: django <LL@li.org>\n"
"Language: fr\n"
...
...
@@ -111,48 +111,56 @@ msgstr "Nom du fournisseur"
msgid "Name for this identity provider displayed on the login page"
msgstr "Nom affiché pour ce fournisseur d'identité sur la page de connexion"
#: models.py:70 models.py:31
2
#: models.py:70 models.py:31
7
msgid "position"
msgstr "position"
#: models.py:159
#: models.py:80
msgid "display"
msgstr "afficher"
#: models.py:81
msgid "Display the provider on the login page"
msgstr "Afficher le fournisseur d'identité sur la page de connexion"
#: models.py:164
msgid "User"
msgstr "Utilisateur"
#: models.py:16
0
#: models.py:16
5
msgid "Users"
msgstr "Utilisateurs"
#: models.py:2
29
#: models.py:2
34
#, python-format
msgid "Error during service logout %s"
msgstr "Une erreur est survenue durant la déconnexion du service %s"
#: models.py:3
07
#: models.py:3
12
msgid "Service pattern"
msgstr "Motif de service"
#: models.py:3
08
#: models.py:3
13
msgid "Services patterns"
msgstr "Motifs de services"
#: models.py:31
3
#: models.py:31
8
msgid "service patterns are sorted using the position attribute"
msgstr "Les motifs de service sont trié selon l'attribut position"
#: models.py:32
0 models.py:444
#: models.py:32
5 models.py:449
msgid "name"
msgstr "nom"
#: models.py:32
1
#: models.py:32
6
msgid "A name for the service"
msgstr "Un nom pour le service"
#: models.py:3
26 models.py:473 models.py:492
#: models.py:3
31 models.py:478 models.py:497
msgid "pattern"
msgstr "motif"
#: models.py:3
28
#: models.py:3
33
msgid ""
"A regular expression matching services. Will usually looks like '^https://"
"some\\.server\\.com/path/.*$'.As it is a regular expression, special "
...
...
@@ -163,55 +171,55 @@ msgstr ""
"expression rationnelle, les caractères spéciaux doivent être échappés avec "
"un '\\'."
#: models.py:3
37
#: models.py:3
42
msgid "user field"
msgstr "champ utilisateur"
#: models.py:3
38
#: models.py:3
43
msgid "Name of the attribut to transmit as username, empty = login"
msgstr ""
"Nom de l'attribut devant être transmis comme nom d'utilisateur au service. "
"vide = nom de connection"
#: models.py:34
2
#: models.py:34
7
msgid "restrict username"
msgstr "limiter les noms d'utilisateurs"
#: models.py:34
3
#: models.py:34
8
msgid "Limit username allowed to connect to the list provided bellow"
msgstr ""
"Limiter les noms d'utilisateurs autorisé à se connecter à la liste fournie "
"ci-dessous"
#: models.py:3
47
#: models.py:3
52
msgid "proxy"
msgstr "proxy"
#: models.py:3
48
#: models.py:3
53
msgid "Proxy tickets can be delivered to the service"
msgstr "des proxy tickets peuvent être délivrés au service"
#: models.py:35
2
#: models.py:35
7
msgid "proxy callback"
msgstr ""
#: models.py:35
3
#: models.py:35
8
msgid "can be used as a proxy callback to deliver PGT"
msgstr "peut être utilisé comme un callback pour recevoir un PGT"
#: models.py:3
57
#: models.py:3
62
msgid "single log out"
msgstr ""
#: models.py:3
58
#: models.py:3
63
msgid "Enable SLO for the service"
msgstr "Active le SLO pour le service"
#: models.py:3
65
#: models.py:3
70
msgid "single log out callback"
msgstr ""
#: models.py:3
66
#: models.py:3
71
msgid ""
"URL where the SLO request will be POST. empty = service url\n"
"This is usefull for non HTTP proxied services."
...
...
@@ -220,51 +228,51 @@ msgstr ""
"service\n"
"Ceci n'est utilise que pour des services non HTTP proxifiés"
#: models.py:4
28
#: models.py:4
33
msgid "username"
msgstr "nom d'utilisateur"
#: models.py:4
29
#: models.py:4
34
msgid "username allowed to connect to the service"
msgstr "noms d'utilisateurs autorisé à se connecter au service"
#: models.py:4
45
#: models.py:4
50
msgid "name of an attribut to send to the service, use * for all attributes"
msgstr ""
"nom d'un attribut a envoyer au service, utiliser * pour tous les attributs"
#: models.py:45
0 models.py:498
#: models.py:45
5 models.py:503
msgid "replace"
msgstr "remplacement"
#: models.py:45
1
#: models.py:45
6
msgid ""
"name under which the attribut will be showto the service. empty = default "
"name of the attribut"
msgstr ""
"nom sous lequel l'attribut sera rendu visible au service. vide = inchangé"
#: models.py:4
68 models.py:487
#: models.py:4
73 models.py:492
msgid "attribut"
msgstr "attribut"
#: models.py:4
69
#: models.py:4
74
msgid "Name of the attribut which must verify pattern"
msgstr "Nom de l'attribut devant vérifier un motif"
#: models.py:47
4
#: models.py:47
9
msgid "a regular expression"
msgstr "une expression régulière"
#: models.py:4
88
#: models.py:4
93
msgid "Name of the attribut for which the value must be replace"
msgstr "nom de l'attribue pour lequel la valeur doit être remplacé"
#: models.py:49
3
#: models.py:49
8
msgid "An regular expression maching whats need to be replaced"
msgstr "une expression régulière reconnaissant ce qui doit être remplacé"
#: models.py:
499
#: models.py:
504
msgid "replace expression, groups are capture by \\1, \\2 …"
msgstr "expression de remplacement, les groupe sont capturé par \\1, \\2"
...
...
cas_server/migrations/0008_federatediendityprovider_display.py
0 → 100644
View file @
b0a07efe
# -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2016-07-04 15:33
from
__future__
import
unicode_literals
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'cas_server'
,
'0007_auto_20160704_1510'
),
]
operations
=
[
migrations
.
AddField
(
model_name
=
'federatediendityprovider'
,
name
=
'display'
,
field
=
models
.
BooleanField
(
default
=
True
,
help_text
=
'Display the provider on the login page'
,
verbose_name
=
'display'
),
),
]
cas_server/models.py
View file @
b0a07efe
...
...
@@ -75,6 +75,11 @@ class FederatedIendityProvider(models.Model):
)
)
)
display
=
models
.
BooleanField
(
default
=
True
,
verbose_name
=
_
(
u
"display"
),
help_text
=
_
(
"Display the provider on the login page"
)
)
def
__str__
(
self
):
return
self
.
verbose_name
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment