1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2024-12-22 23:42:25 +00:00

Add signup link, customize templates

This commit is contained in:
Yohann D'ANELLO 2020-03-07 18:18:35 +01:00
parent 09137dd9d7
commit 8f1caddbe0
15 changed files with 607 additions and 111 deletions

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-02-27 17:39+0100\n"
"POT-Creation-Date: 2020-03-07 18:01+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -24,8 +24,8 @@ msgstr ""
#: apps/activity/models.py:19 apps/activity/models.py:44
#: apps/member/models.py:60 apps/member/models.py:111
#: apps/note/models/notes.py:184 apps/note/models/transactions.py:24
#: apps/note/models/transactions.py:44 templates/member/profile_detail.html:11
#: apps/note/models/notes.py:187 apps/note/models/transactions.py:24
#: apps/note/models/transactions.py:44 templates/member/profile_detail.html:15
msgid "name"
msgstr ""
@ -49,7 +49,7 @@ msgstr ""
msgid "description"
msgstr ""
#: apps/activity/models.py:54 apps/note/models/notes.py:160
#: apps/activity/models.py:54 apps/note/models/notes.py:163
#: apps/note/models/transactions.py:62
msgid "type"
msgstr ""
@ -90,39 +90,43 @@ msgstr ""
msgid "Logs"
msgstr ""
#: apps/logs/models.py:20 apps/note/models/notes.py:105
#: apps/logs/models.py:21 apps/note/models/notes.py:116
msgid "user"
msgstr ""
#: apps/logs/models.py:27
msgid "IP Address"
msgstr ""
#: apps/logs/models.py:35
msgid "model"
msgstr ""
#: apps/logs/models.py:34
#: apps/logs/models.py:42
msgid "identifier"
msgstr ""
#: apps/logs/models.py:39
#: apps/logs/models.py:47
msgid "previous data"
msgstr ""
#: apps/logs/models.py:44
#: apps/logs/models.py:52
msgid "new data"
msgstr ""
#: apps/logs/models.py:51
#: apps/logs/models.py:59
msgid "action"
msgstr ""
#: apps/logs/models.py:59
#: apps/logs/models.py:67
msgid "timestamp"
msgstr ""
#: apps/logs/models.py:63
#: apps/logs/models.py:71
msgid "Logs cannot be destroyed."
msgstr ""
#: apps/member/apps.py:10
#: apps/member/apps.py:14
msgid "member"
msgstr ""
@ -130,7 +134,7 @@ msgstr ""
msgid "phone number"
msgstr ""
#: apps/member/models.py:29 templates/member/profile_detail.html:24
#: apps/member/models.py:29 templates/member/profile_detail.html:28
msgid "section"
msgstr ""
@ -138,7 +142,7 @@ msgstr ""
msgid "e.g. \"1A0\", \"9A♥\", \"SAPHIRE\""
msgstr ""
#: apps/member/models.py:36 templates/member/profile_detail.html:27
#: apps/member/models.py:36 templates/member/profile_detail.html:31
msgid "address"
msgstr ""
@ -184,7 +188,7 @@ msgid ""
"members can renew their membership."
msgstr ""
#: apps/member/models.py:93 apps/note/models/notes.py:135
#: apps/member/models.py:93 apps/note/models/notes.py:138
msgid "club"
msgstr ""
@ -220,19 +224,23 @@ msgstr ""
msgid "memberships"
msgstr ""
#: apps/member/views.py:63 templates/member/profile_detail.html:42
#: apps/member/views.py:69 templates/member/profile_detail.html:46
msgid "Update Profile"
msgstr ""
#: apps/member/views.py:79
#: apps/member/views.py:82
msgid "An alias with a similar name already exists."
msgstr ""
#: apps/member/views.py:130
#: apps/member/views.py:132
#, python-format
msgid "Account #%(id)s: %(username)s"
msgstr ""
#: apps/member/views.py:200
msgid "Alias successfully deleted"
msgstr ""
#: apps/note/admin.py:120 apps/note/models/transactions.py:93
msgid "source"
msgstr ""
@ -242,11 +250,23 @@ msgstr ""
msgid "destination"
msgstr ""
#: apps/note/apps.py:14 apps/note/models/notes.py:54
#: apps/note/apps.py:14 apps/note/models/notes.py:57
msgid "note"
msgstr ""
#: apps/note/forms.py:49
#: apps/note/forms.py:26
msgid "New Alias"
msgstr ""
#: apps/note/forms.py:31
msgid "select an image"
msgstr ""
#: apps/note/forms.py:32
msgid "Maximal size: 2MB"
msgstr ""
#: apps/note/forms.py:77
msgid "Source and destination must be different."
msgstr ""
@ -280,81 +300,77 @@ msgstr ""
msgid "display image"
msgstr ""
#: apps/note/models/notes.py:49 apps/note/models/transactions.py:102
#: apps/note/models/notes.py:52 apps/note/models/transactions.py:102
msgid "created at"
msgstr ""
#: apps/note/models/notes.py:55
#: apps/note/models/notes.py:58
msgid "notes"
msgstr ""
#: apps/note/models/notes.py:63
#: apps/note/models/notes.py:66
msgid "Note"
msgstr ""
#: apps/note/models/notes.py:73 apps/note/models/notes.py:97
#: apps/note/models/notes.py:76 apps/note/models/notes.py:100
msgid "This alias is already taken."
msgstr ""
#: apps/note/models/notes.py:113
msgid "user"
msgstr ""
#: apps/note/models/notes.py:117
#: apps/note/models/notes.py:120
msgid "one's note"
msgstr ""
#: apps/note/models/notes.py:118
#: apps/note/models/notes.py:121
msgid "users note"
msgstr ""
#: apps/note/models/notes.py:124
#: apps/note/models/notes.py:127
#, python-format
msgid "%(user)s's note"
msgstr ""
#: apps/note/models/notes.py:139
#: apps/note/models/notes.py:142
msgid "club note"
msgstr ""
#: apps/note/models/notes.py:140
#: apps/note/models/notes.py:143
msgid "clubs notes"
msgstr ""
#: apps/note/models/notes.py:146
#: apps/note/models/notes.py:149
#, python-format
msgid "Note of %(club)s club"
msgstr ""
#: apps/note/models/notes.py:166
#: apps/note/models/notes.py:169
msgid "special note"
msgstr ""
#: apps/note/models/notes.py:167
#: apps/note/models/notes.py:170
msgid "special notes"
msgstr ""
#: apps/note/models/notes.py:190
#: apps/note/models/notes.py:193
msgid "Invalid alias"
msgstr ""
#: apps/note/models/notes.py:206
#: apps/note/models/notes.py:209
msgid "alias"
msgstr ""
#: apps/note/models/notes.py:207 templates/member/profile_detail.html:33
#: apps/note/models/notes.py:210 templates/member/profile_detail.html:37
msgid "aliases"
msgstr ""
#: apps/note/models/notes.py:233
#: apps/note/models/notes.py:228
msgid "Alias is too long."
msgstr ""
#: apps/note/models/notes.py:238
msgid "An alias with a similar name already exists:"
#: apps/note/models/notes.py:233
msgid "An alias with a similar name already exists: {} "
msgstr ""
#: apps/note/models/notes.py:246
#: apps/note/models/notes.py:242
msgid "You can't delete your main alias."
msgstr ""
@ -422,22 +438,79 @@ msgstr ""
msgid "Consommations"
msgstr ""
#: note_kfet/settings/base.py:155
#: note_kfet/settings/base.py:162
msgid "German"
msgstr ""
#: note_kfet/settings/base.py:156
#: note_kfet/settings/base.py:163
msgid "English"
msgstr ""
#: note_kfet/settings/base.py:157
#: note_kfet/settings/base.py:164
msgid "French"
msgstr ""
#: note_kfet/settings/base.py:215
msgid ""
"The Central Authentication Service grants you access to most of our websites "
"by authenticating only once, so you don't need to type your credentials "
"again unless your session expires or you logout."
msgstr ""
#: templates/base.html:13
msgid "The ENS Paris-Saclay BDE note."
msgstr ""
#: templates/cas_server/base.html:7 templates/cas_server/base.html:26
msgid "Central Authentication Service"
msgstr ""
#: templates/cas_server/base.html:43
#, python-format
msgid ""
"A new version of the application is available. This instance runs "
"%(VERSION)s and the last version is %(LAST_VERSION)s. Please consider "
"upgrading."
msgstr ""
#: templates/cas_server/logged.html:4
msgid ""
"<h3>Log In Successful</h3>You have successfully logged into the Central "
"Authentication Service.<br/>For security reasons, please Log Out and Exit "
"your web browser when you are done accessing services that require "
"authentication!"
msgstr ""
#: templates/cas_server/logged.html:8
msgid "Log me out from all my sessions"
msgstr ""
#: templates/cas_server/logged.html:14
msgid "Forget the identity provider"
msgstr ""
#: templates/cas_server/logged.html:18
msgid "Logout"
msgstr ""
#: templates/cas_server/login.html:6
msgid "Please log in"
msgstr ""
#: templates/cas_server/login.html:11
msgid ""
"If you don't have any Note Kfet account, please follow <a href='/accounts/"
"signup'>this link to sign up</a>."
msgstr ""
#: templates/cas_server/login.html:17
msgid "Login"
msgstr ""
#: templates/cas_server/warn.html:9
msgid "Connect to the service"
msgstr ""
#: templates/member/club_detail.html:10
msgid "Membership starts on"
msgstr ""
@ -450,10 +523,14 @@ msgstr ""
msgid "Membership duration"
msgstr ""
#: templates/member/club_detail.html:18 templates/member/profile_detail.html:30
#: templates/member/club_detail.html:18 templates/member/profile_detail.html:34
msgid "balance"
msgstr ""
#: templates/member/club_detail.html:51 templates/member/profile_detail.html:75
msgid "Transaction history"
msgstr ""
#: templates/member/manage_auth_tokens.html:16
msgid "Token"
msgstr ""
@ -466,27 +543,35 @@ msgstr ""
msgid "Regenerate token"
msgstr ""
#: templates/member/profile_detail.html:11
#: templates/member/profile_alias.html:10
msgid "Add alias"
msgstr ""
#: templates/member/profile_detail.html:15
msgid "first name"
msgstr ""
#: templates/member/profile_detail.html:14
#: templates/member/profile_detail.html:18
msgid "username"
msgstr ""
#: templates/member/profile_detail.html:17
#: templates/member/profile_detail.html:21
msgid "password"
msgstr ""
#: templates/member/profile_detail.html:20
#: templates/member/profile_detail.html:24
msgid "Change password"
msgstr ""
#: templates/member/profile_detail.html:38
#: templates/member/profile_detail.html:42
msgid "Manage auth token"
msgstr ""
#: templates/member/profile_detail.html:54
#: templates/member/profile_detail.html:49
msgid "View Profile"
msgstr ""
#: templates/member/profile_detail.html:62
msgid "View my memberships"
msgstr ""

View File

@ -3,7 +3,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-02-27 17:39+0100\n"
"POT-Creation-Date: 2020-03-07 18:01+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -19,8 +19,8 @@ msgstr "activité"
#: apps/activity/models.py:19 apps/activity/models.py:44
#: apps/member/models.py:60 apps/member/models.py:111
#: apps/note/models/notes.py:184 apps/note/models/transactions.py:24
#: apps/note/models/transactions.py:44 templates/member/profile_detail.html:11
#: apps/note/models/notes.py:187 apps/note/models/transactions.py:24
#: apps/note/models/transactions.py:44 templates/member/profile_detail.html:15
msgid "name"
msgstr "nom"
@ -44,7 +44,7 @@ msgstr "types d'activité"
msgid "description"
msgstr "description"
#: apps/activity/models.py:54 apps/note/models/notes.py:160
#: apps/activity/models.py:54 apps/note/models/notes.py:163
#: apps/note/models/transactions.py:62
msgid "type"
msgstr "type"
@ -85,43 +85,49 @@ msgstr ""
msgid "Logs"
msgstr ""
#: apps/logs/models.py:20 apps/note/models/notes.py:105
#: apps/logs/models.py:21 apps/note/models/notes.py:116
msgid "user"
msgstr "utilisateur"
#: apps/logs/models.py:27
#, fuzzy
#| msgid "address"
msgid "IP Address"
msgstr "adresse"
#: apps/logs/models.py:35
msgid "model"
msgstr "Modèle"
#: apps/logs/models.py:34
#: apps/logs/models.py:42
msgid "identifier"
msgstr "Identifiant"
#: apps/logs/models.py:39
#: apps/logs/models.py:47
msgid "previous data"
msgstr "Données précédentes"
#: apps/logs/models.py:44
#: apps/logs/models.py:52
#, fuzzy
#| msgid "end date"
msgid "new data"
msgstr "Nouvelles données"
#: apps/logs/models.py:51
#: apps/logs/models.py:59
#, fuzzy
#| msgid "section"
msgid "action"
msgstr "Action"
#: apps/logs/models.py:59
#: apps/logs/models.py:67
msgid "timestamp"
msgstr "Date"
#: apps/logs/models.py:63
#: apps/logs/models.py:71
msgid "Logs cannot be destroyed."
msgstr "Les logs ne peuvent pas être détruits."
#: apps/member/apps.py:10
#: apps/member/apps.py:14
msgid "member"
msgstr "adhérent"
@ -129,7 +135,7 @@ msgstr "adhérent"
msgid "phone number"
msgstr "numéro de téléphone"
#: apps/member/models.py:29 templates/member/profile_detail.html:24
#: apps/member/models.py:29 templates/member/profile_detail.html:28
msgid "section"
msgstr "section"
@ -137,7 +143,7 @@ msgstr "section"
msgid "e.g. \"1A0\", \"9A♥\", \"SAPHIRE\""
msgstr "e.g. \"1A0\", \"9A♥\", \"SAPHIRE\""
#: apps/member/models.py:36 templates/member/profile_detail.html:27
#: apps/member/models.py:36 templates/member/profile_detail.html:31
msgid "address"
msgstr "adresse"
@ -187,7 +193,7 @@ msgstr ""
"Combien de temps l'adhésion peut durer après le 1er Janvier de l'année "
"suivante avant que les adhérents peuvent renouveler leur adhésion."
#: apps/member/models.py:93 apps/note/models/notes.py:135
#: apps/member/models.py:93 apps/note/models/notes.py:138
msgid "club"
msgstr "club"
@ -223,19 +229,23 @@ msgstr "adhésion"
msgid "memberships"
msgstr "adhésions"
#: apps/member/views.py:63 templates/member/profile_detail.html:42
#: apps/member/views.py:69 templates/member/profile_detail.html:46
msgid "Update Profile"
msgstr "Modifier le profil"
#: apps/member/views.py:79
#: apps/member/views.py:82
msgid "An alias with a similar name already exists."
msgstr "Un alias avec un nom similaire existe déjà."
#: apps/member/views.py:130
#: apps/member/views.py:132
#, python-format
msgid "Account #%(id)s: %(username)s"
msgstr "Compte n°%(id)s : %(username)s"
#: apps/member/views.py:200
msgid "Alias successfully deleted"
msgstr ""
#: apps/note/admin.py:120 apps/note/models/transactions.py:93
msgid "source"
msgstr "source"
@ -245,11 +255,25 @@ msgstr "source"
msgid "destination"
msgstr "destination"
#: apps/note/apps.py:14 apps/note/models/notes.py:54
#: apps/note/apps.py:14 apps/note/models/notes.py:57
msgid "note"
msgstr "note"
#: apps/note/forms.py:49
#: apps/note/forms.py:26
msgid "New Alias"
msgstr ""
#: apps/note/forms.py:31
#, fuzzy
#| msgid "display image"
msgid "select an image"
msgstr "image affichée"
#: apps/note/forms.py:32
msgid "Maximal size: 2MB"
msgstr ""
#: apps/note/forms.py:77
msgid "Source and destination must be different."
msgstr "La source et la destination doivent être différentes."
@ -284,81 +308,79 @@ msgstr ""
msgid "display image"
msgstr "image affichée"
#: apps/note/models/notes.py:49 apps/note/models/transactions.py:102
#: apps/note/models/notes.py:52 apps/note/models/transactions.py:102
msgid "created at"
msgstr "créée le"
#: apps/note/models/notes.py:55
#: apps/note/models/notes.py:58
msgid "notes"
msgstr "notes"
#: apps/note/models/notes.py:63
#: apps/note/models/notes.py:66
msgid "Note"
msgstr "Note"
#: apps/note/models/notes.py:73 apps/note/models/notes.py:97
#: apps/note/models/notes.py:76 apps/note/models/notes.py:100
msgid "This alias is already taken."
msgstr "Cet alias est déjà pris."
#: apps/note/models/notes.py:113
msgid "user"
msgstr "utilisateur"
#: apps/note/models/notes.py:117
#: apps/note/models/notes.py:120
msgid "one's note"
msgstr "note d'un utilisateur"
#: apps/note/models/notes.py:118
#: apps/note/models/notes.py:121
msgid "users note"
msgstr "notes des utilisateurs"
#: apps/note/models/notes.py:124
#: apps/note/models/notes.py:127
#, python-format
msgid "%(user)s's note"
msgstr "Note de %(user)s"
#: apps/note/models/notes.py:139
#: apps/note/models/notes.py:142
msgid "club note"
msgstr "note d'un club"
#: apps/note/models/notes.py:140
#: apps/note/models/notes.py:143
msgid "clubs notes"
msgstr "notes des clubs"
#: apps/note/models/notes.py:146
#: apps/note/models/notes.py:149
#, python-format
msgid "Note of %(club)s club"
msgstr "Note du club %(club)s"
#: apps/note/models/notes.py:166
#: apps/note/models/notes.py:169
msgid "special note"
msgstr "note spéciale"
#: apps/note/models/notes.py:167
#: apps/note/models/notes.py:170
msgid "special notes"
msgstr "notes spéciales"
#: apps/note/models/notes.py:190
#: apps/note/models/notes.py:193
msgid "Invalid alias"
msgstr "Alias invalide"
#: apps/note/models/notes.py:206
#: apps/note/models/notes.py:209
msgid "alias"
msgstr "alias"
#: apps/note/models/notes.py:207 templates/member/profile_detail.html:33
#: apps/note/models/notes.py:210 templates/member/profile_detail.html:37
msgid "aliases"
msgstr "alias"
#: apps/note/models/notes.py:233
#: apps/note/models/notes.py:228
msgid "Alias is too long."
msgstr "L'alias est trop long."
#: apps/note/models/notes.py:238
msgid "An alias with a similar name already exists:"
#: apps/note/models/notes.py:233
#, fuzzy
#| msgid "An alias with a similar name already exists:"
msgid "An alias with a similar name already exists: {} "
msgstr "Un alias avec un nom similaire existe déjà."
#: apps/note/models/notes.py:246
#: apps/note/models/notes.py:242
msgid "You can't delete your main alias."
msgstr "Vous ne pouvez pas supprimer votre alias principal."
@ -427,22 +449,81 @@ msgstr "Transfert d'argent de ton compte vers un ou plusieurs autres"
msgid "Consommations"
msgstr "transactions"
#: note_kfet/settings/base.py:155
#: note_kfet/settings/base.py:162
msgid "German"
msgstr ""
#: note_kfet/settings/base.py:156
#: note_kfet/settings/base.py:163
msgid "English"
msgstr ""
#: note_kfet/settings/base.py:157
#: note_kfet/settings/base.py:164
msgid "French"
msgstr ""
#: note_kfet/settings/base.py:215
msgid ""
"The Central Authentication Service grants you access to most of our websites "
"by authenticating only once, so you don't need to type your credentials "
"again unless your session expires or you logout."
msgstr ""
#: templates/base.html:13
msgid "The ENS Paris-Saclay BDE note."
msgstr "La note du BDE de l'ENS Paris-Saclay."
#: templates/cas_server/base.html:7 templates/cas_server/base.html:26
msgid "Central Authentication Service"
msgstr ""
#: templates/cas_server/base.html:43
#, python-format
msgid ""
"A new version of the application is available. This instance runs "
"%(VERSION)s and the last version is %(LAST_VERSION)s. Please consider "
"upgrading."
msgstr ""
#: templates/cas_server/logged.html:4
msgid ""
"<h3>Log In Successful</h3>You have successfully logged into the Central "
"Authentication Service.<br/>For security reasons, please Log Out and Exit "
"your web browser when you are done accessing services that require "
"authentication!"
msgstr ""
#: templates/cas_server/logged.html:8
msgid "Log me out from all my sessions"
msgstr ""
#: templates/cas_server/logged.html:14
msgid "Forget the identity provider"
msgstr ""
#: templates/cas_server/logged.html:18
msgid "Logout"
msgstr ""
#: templates/cas_server/login.html:6
msgid "Please log in"
msgstr ""
#: templates/cas_server/login.html:11
msgid ""
"If you don't have any Note Kfet account, please follow <a href='/accounts"
"/signup'>this link to sign up</a>."
msgstr ""
"Si vous n'avez pas de compte Note Kfet, veuillez suivre <a href='/accounts"
"/signup'>ce lien pour vous inscrire</a>."
#: templates/cas_server/login.html:17
msgid "Login"
msgstr ""
#: templates/cas_server/warn.html:9
msgid "Connect to the service"
msgstr ""
#: templates/member/club_detail.html:10
msgid "Membership starts on"
msgstr "L'adhésion commence le"
@ -455,10 +536,14 @@ msgstr "L'adhésion finie le"
msgid "Membership duration"
msgstr "Durée de l'adhésion"
#: templates/member/club_detail.html:18 templates/member/profile_detail.html:30
#: templates/member/club_detail.html:18 templates/member/profile_detail.html:34
msgid "balance"
msgstr "solde du compte"
#: templates/member/club_detail.html:51 templates/member/profile_detail.html:75
msgid "Transaction history"
msgstr "Historique des transactions"
#: templates/member/manage_auth_tokens.html:16
msgid "Token"
msgstr "Jeton"
@ -471,33 +556,39 @@ msgstr "Créé le"
msgid "Regenerate token"
msgstr "Regénérer le jeton"
#: templates/member/profile_detail.html:11
#: templates/member/profile_alias.html:10
#, fuzzy
#| msgid "alias"
msgid "Add alias"
msgstr "alias"
#: templates/member/profile_detail.html:15
msgid "first name"
msgstr ""
#: templates/member/profile_detail.html:14
#: templates/member/profile_detail.html:18
msgid "username"
msgstr ""
#: templates/member/profile_detail.html:17
#, fuzzy
#| msgid "Change password"
#: templates/member/profile_detail.html:21
msgid "password"
msgstr ""
#: templates/member/profile_detail.html:20
#: templates/member/profile_detail.html:24
msgid "Change password"
msgstr "Changer le mot de passe"
#: templates/member/profile_detail.html:38
#: templates/member/profile_detail.html:42
msgid "Manage auth token"
msgstr "Gérer les jetons d'authentification"
#: templates/member/profile_detail.html:51
msgid "Transaction history"
msgstr "Historique des transactions"
#: templates/member/profile_detail.html:49
#, fuzzy
#| msgid "Update Profile"
msgid "View Profile"
msgstr "Modifier le profil"
#: templates/member/profile_detail.html:54
#: templates/member/profile_detail.html:62
msgid "View my memberships"
msgstr "Voir mes adhésions"

View File

@ -206,4 +206,22 @@ PIC_RATIO = 1
CAS_AUTO_CREATE_USER = False
CAS_LOGO_URL = "/static/img/Saperlistpopette.png"
CAS_FAVICON_URL = "/static/favicon/favicon-32x32.png"
CAS_SHOW_SERVICE_MESSAGES = True
CAS_SHOW_POWERED = False
CAS_REDIRECT_TO_LOGIN_AFTER_LOGOUT = False
CAS_INFO_MESSAGES = {
"cas_explained": {
"message":_(
u"The Central Authentication Service grants you access to most of our websites by "
u"authenticating only once, so you don't need to type your credentials again unless "
u"your session expires or you logout."
),
"discardable": True,
"type": "info", # one of info, success, info, warning, danger
},
}
CAS_INFO_MESSAGES_ORDER = [
'cas_explained',
]

View File

@ -52,3 +52,8 @@ SESSION_COOKIE_AGE = 60 * 60 * 3
# CAS Client settings
# Can be modified in secrets.py
CAS_SERVER_URL = "https://note.comby.xyz/cas/"
STATIC_ROOT = '' # not needed in development settings
STATICFILES_DIRS = [
os.path.join(BASE_DIR, 'static')]

View File

@ -0,0 +1,99 @@
{% load i18n %}{% load static %}{% get_current_language as LANGUAGE_CODE %}<!DOCTYPE html>
<html{% if LANGUAGE_CODE %} lang="{{LANGUAGE_CODE}}"{% endif %}>
<head>
<meta charset="utf-8">
<!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge" /><![endif]-->
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{% block title %}{% trans "Central Authentication Service" %}{% endblock %}</title>
<link href="{{settings.CAS_COMPONENT_URLS.bootstrap3_css}}" rel="stylesheet">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="{{settings.CAS_COMPONENT_URLS.html5shiv}}"></script>
<script src="{{settings.CAS_COMPONENT_URLS.respond}}"></script>
<![endif]-->
{% if settings.CAS_FAVICON_URL %}<link rel="shortcut icon" href="{{settings.CAS_FAVICON_URL}}" />{% endif %}
<link href="{% static "cas_server/styles.css" %}" rel="stylesheet">
</head>
<body>
<div id="wrap">
<div class="container">
{% if auto_submit %}<noscript>{% endif %}
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
<h1 id="app-name">
{% if settings.CAS_LOGO_URL %}<img src="{{settings.CAS_LOGO_URL}}" alt="cas-logo" />{% endif %}
Authentification Note Kfet 2020</h1>
</div>
</div>
{% if auto_submit %}</noscript>{% endif %}
<div class="row">
<div class="col-lg-3 col-md-3 col-sm-2 col-xs-12"></div>
<div class="col-lg-6 col-md-6 col-sm-8 col-xs-12">
{% if auto_submit %}<noscript>{% endif %}
{% for msg in CAS_INFO_RENDER %}
<div class="alert alert-{{msg.type}}{% if msg.discardable %} alert-dismissable{% endif %}">
{% if msg.discardable %}<button type="button" class="close" data-dismiss="alert" aria-hidden="true" id="info-{{msg.name}}">&#215;</button>{% endif %}
<p>{{msg.message}}</p>
</div>
{% endfor %}
{% if settings.CAS_NEW_VERSION_HTML_WARNING and upgrade_available %}
<div class="alert alert-info alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true" id="alert-version">&#215;</button>
<p>{% blocktrans %}A new version of the application is available. This instance runs {{VERSION}} and the last version is {{LAST_VERSION}}. Please consider upgrading.{% endblocktrans %}</p>
</div>
{% endif %}
{% block ante_messages %}{% endblock %}
{% for message in messages %}
<div {% spaceless %}
{% if message.level == message_levels.DEBUG %}
class="alert alert-warning"
{% elif message.level == message_levels.INFO %}
class="alert alert-info"
{% elif message.level == message_levels.SUCCESS %}
class="alert alert-success"
{% elif message.level == message_levels.WARNING %}
class="alert alert-warning"
{% else %}
class="alert alert-danger"
{% endif %}
{% endspaceless %}>
<p>{{message}}</p>
</div>
{% endfor %}
{% if auto_submit %}</noscript>{% endif %}
{% block content %}{% endblock %}
</div>
<div class="col-lg-3 col-md-3 col-sm-2 col-xs-0"></div>
</div>
</div> <!-- /container -->
</div>
<div style="clear: both;"></div>
{% if settings.CAS_SHOW_POWERED %}
<div id="footer">
<p><a class="text-muted" href="https://pypi.org/project/django-cas-server/">django-cas-server powered</a></p>
</div>
{% endif %}
<script src="{{settings.CAS_COMPONENT_URLS.jquery}}"></script>
<script src="{{settings.CAS_COMPONENT_URLS.bootstrap3_js}}"></script>
<script src="{% static "cas_server/functions.js" %}"></script>
<script type="text/javascript">
{% if settings.CAS_NEW_VERSION_HTML_WARNING and upgrade_available %}
discard_and_remember("#alert-version", "cas-alert-version", "{{LAST_VERSION}}");
{% endif %}
{% for msg in CAS_INFO_RENDER %}
{% if msg.discardable %}
discard_and_remember("#info-{{msg.name}}", "cas-info-{{msg.name}}", "{{msg.hash}}");
{% endif %}
{% endfor %}
{% block javascript_inline %}{% endblock %}
</script>
{% block javascript %}{% endblock %}
</body>
</html>
<!--
Powered by django-cas-server version {{VERSION}}
Pypi: https://pypi.org/project/django-cas-server/
github: https://github.com/nitmir/django-cas-server
-->

View File

@ -0,0 +1,26 @@
{% load cas_server %}
{% for error in form.non_field_errors %}
<div class="alert alert-danger alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&#215;</button>
{{error}}
</div>
{% endfor %}
{% for field in form %}{% if not field|is_hidden %}
<div class="form-group
{% if not form.non_field_errors %}
{% if field.errors %} has-error
{% elif form.cleaned_data %} has-success
{% endif %}
{% endif %}"
>{% spaceless %}
{% if field|is_checkbox %}
<div class="checkbox"><label for="{{field.auto_id}}">{{field}}{{field.label}}</label></div>
{% else %}
<label class="control-label" for="{{field.auto_id}}">{{field.label}}</label>
{{field}}
{% endif %}
{% for error in field.errors %}
<span class="help-block">{{error}}</span>
{% endfor %}
{% endspaceless %}</div>
{% else %}{{field}}{% endif %}{% endfor %}

View File

@ -0,0 +1,21 @@
{% extends "cas_server/base.html" %}
{% load i18n %}
{% block content %}
<div class="alert alert-success" role="alert">{% blocktrans %}<h3>Log In Successful</h3>You have successfully logged into the Central Authentication Service.<br/>For security reasons, please Log Out and Exit your web browser when you are done accessing services that require authentication!{% endblocktrans %}</div>
<form class="form-signin" method="get" action="logout">
<div class="checkbox">
<label>
<input type="checkbox" name="all" value="1">{% trans "Log me out from all my sessions" %}
</label>
</div>
{% if settings.CAS_FEDERATE and request.COOKIES.remember_provider %}
<div class="checkbox">
<label>
<input type="checkbox" name="forget_provider" value="1">{% trans "Forget the identity provider" %}
</label>
</div>
{% endif %}
<button class="btn btn-danger btn-block btn-lg" type="submit">{% trans "Logout" %}</button>
</form>
{% endblock %}

View File

@ -0,0 +1,33 @@
{% extends "cas_server/base.html" %}
{% load i18n %}
{% block ante_messages %}
{% if auto_submit %}<noscript>{% endif %}
<h2 class="form-signin-heading">{% trans "Please log in" %}</h2>
{% if auto_submit %}</noscript>{% endif %}
{% endblock %}
{% block content %}
<div class="alert alert-warning">
{% trans "If you don't have any Note Kfet account, please follow <a href='/accounts/signup'>this link to sign up</a>." %}
</div>
<form class="form-signin" method="post" id="login_form"{% if post_url %} action="{{post_url}}"{% endif %}>
{% csrf_token %}
{% include "cas_server/form.html" %}
{% if auto_submit %}<noscript>{% endif %}
<button class="btn btn-primary btn-block btn-lg" type="submit">{% trans "Login" %}</button>
{% if auto_submit %}</noscript>{% endif %}
</form>
{% endblock %}
{% block javascript_inline %}
jQuery(function( $ ){
$("#id_warn").click(function(e){
if($("#id_warn").is(':checked')){
createCookie("warn", "on", 10 * 365);
} else {
eraseCookie("warn");
}
});
});{% if auto_submit %}
document.getElementById('login_form').submit(); // SUBMIT FORM{% endif %}
{% endblock %}

View File

@ -0,0 +1,7 @@
{% extends "cas_server/base.html" %}
{% load static %}
{% load i18n %}
{% block content %}
<div class="alert alert-success" role="alert">{{logout_msg}}</div>
{% endblock %}

View File

@ -0,0 +1,5 @@
<cas:serviceResponse xmlns:cas="http://www.yale.edu/tp/cas">
<cas:proxySuccess>
<cas:proxyTicket>{{ticket}}</cas:proxyTicket>
</cas:proxySuccess>
</cas:serviceResponse>

View File

@ -0,0 +1,59 @@
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header />
<SOAP-ENV:Body>
<Response xmlns="urn:oasis:names:tc:SAML:1.0:protocol" xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion"
xmlns:samlp="urn:oasis:names:tc:SAML:1.0:protocol" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" IssueInstant="{{IssueInstant}}"
MajorVersion="1" MinorVersion="1" Recipient="{{Recipient}}"
ResponseID="{{ResponseID}}">
<Status>
<StatusCode Value="samlp:Success">
</StatusCode>
</Status>
<Assertion xmlns="urn:oasis:names:tc:SAML:1.0:assertion" AssertionID="{{ResponseID}}"
IssueInstant="{{IssueInstant}}" Issuer="localhost" MajorVersion="1"
MinorVersion="1">
<Conditions NotBefore="{{IssueInstant}}" NotOnOrAfter="{{expireInstant}}">
<AudienceRestrictionCondition>
<Audience>
{{Recipient}}
</Audience>
</AudienceRestrictionCondition>
</Conditions>
<AttributeStatement>
<Subject>
<NameIdentifier>{{username}}</NameIdentifier>
<SubjectConfirmation>
<ConfirmationMethod>
urn:oasis:names:tc:SAML:1.0:cm:artifact
</ConfirmationMethod>
</SubjectConfirmation>
</Subject>
<Attribute AttributeName="authenticationDate" AttributeNamespace="http://www.ja-sig.org/products/cas/">
<AttributeValue>{{auth_date}}</AttributeValue>
</Attribute>
<Attribute AttributeName="longTermAuthenticationRequestTokenUsed" AttributeNamespace="http://www.ja-sig.org/products/cas/">
<AttributeValue>false</AttributeValue>{# we do not support long-term (Remember-Me) auth #}
</Attribute>
<Attribute AttributeName="isFromNewLogin" AttributeNamespace="http://www.ja-sig.org/products/cas/">
<AttributeValue>{{is_new_login}}</AttributeValue>
</Attribute>
{% for name, value in attributes %} <Attribute AttributeName="{{name}}" AttributeNamespace="http://www.ja-sig.org/products/cas/">
<AttributeValue>{{value}}</AttributeValue>
</Attribute>
{% endfor %} </AttributeStatement>
<AuthenticationStatement AuthenticationInstant="{{IssueInstant}}"
AuthenticationMethod="urn:oasis:names:tc:SAML:1.0:am:password">
<Subject>
<NameIdentifier>{{username}}</NameIdentifier>
<SubjectConfirmation>
<ConfirmationMethod>
urn:oasis:names:tc:SAML:1.0:cm:artifact
</ConfirmationMethod>
</SubjectConfirmation>
</Subject>
</AuthenticationStatement>
</Assertion>
</Response>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

View File

@ -0,0 +1,14 @@
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header />
<SOAP-ENV:Body>
<Response xmlns="urn:oasis:names:tc:SAML:1.0:protocol" xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion"
xmlns:samlp="urn:oasis:names:tc:SAML:1.0:protocol" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" IssueInstant="{{IssueInstant}}"
MajorVersion="1" MinorVersion="1" Recipient="{{Recipient}}"
ResponseID="{{ResponseID}}">
<Status>
<StatusCode Value="samlp:{{code}}">{{msg}}</StatusCode>
</Status>
</Response>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

View File

@ -0,0 +1,19 @@
<cas:serviceResponse xmlns:cas="http://www.yale.edu/tp/cas">
<cas:authenticationSuccess>
<cas:user>{{username}}</cas:user>
<cas:attributes>
<cas:authenticationDate>{{auth_date}}</cas:authenticationDate>
<cas:longTermAuthenticationRequestTokenUsed>false</cas:longTermAuthenticationRequestTokenUsed>{# we do not support long-term (Remember-Me) auth #}
<cas:isFromNewLogin>{{is_new_login}}</cas:isFromNewLogin>
{% for key, value in attributes %} <cas:{{key}}>{{value}}</cas:{{key}}>
{% endfor %} </cas:attributes>
<cas:attribute name="authenticationDate" value="{{auth_date}}"/>
<cas:attribute name="longTermAuthenticationRequestTokenUsed" value="false"/>
<cas:attribute name="isFromNewLogin" value="{{is_new_login}}"/>
{% for key, value in attributes %} <cas:attribute name="{{key}}" value="{{value}}"/>
{% endfor %}{% if proxyGrantingTicket %} <cas:proxyGrantingTicket>{{proxyGrantingTicket}}</cas:proxyGrantingTicket>
{% endif %}{% if proxies %} <cas:proxies>
{% for proxy in proxies %} <cas:proxy>{{proxy}}</cas:proxy>
{% endfor %} </cas:proxies>
{% endif %} </cas:authenticationSuccess>
</cas:serviceResponse>

View File

@ -0,0 +1,3 @@
<cas:serviceResponse xmlns:cas="http://www.yale.edu/tp/cas">
<cas:authenticationFailure code="{{code}}">{{msg}}</cas:authenticationFailure>
</cas:serviceResponse>

View File

@ -0,0 +1,11 @@
{% extends "cas_server/base.html" %}
{% load static %}
{% load i18n %}
{% block content %}
<form class="form-signin" method="post">
{% csrf_token %}
{% include "cas_server/form.html" %}
<button class="btn btn-primary btn-block btn-lg" type="submit">{% trans "Connect to the service" %}</button>
</form>
{% endblock %}