feat(cas_eleves): Add a fixture for service patterns

This commit is contained in:
Tom Hubrecht 2024-07-04 09:55:04 +02:00
parent b1fe687cf4
commit bb1dcb0f6e
2 changed files with 133 additions and 0 deletions

View file

@ -25,6 +25,11 @@ ALLOWED_HOSTS = credentials.get_json("ALLOWED_HOSTS", [])
DEFAULT_AUTO_FIELD = "django.db.models.AutoField"
###
# Fixtures configuration
FIXTURE_DIRS = [LOCAL_DIR / "fixtures"]
###
# List the installed applications

View file

@ -0,0 +1,128 @@
[
{
"model": "cas_server.servicepattern",
"pk": 1,
"fields": {
"pos": 100,
"name": "ENS-PSL",
"pattern": "^https?://[a-z0-9.\\-]+\\.ens\\.(fr|psl\\.eu)/.*$",
"user_field": "",
"restrict_users": false,
"proxy": false,
"proxy_callback": false,
"single_log_out": false,
"single_log_out_callback": ""
}
},
{
"model": "cas_server.servicepattern",
"pk": 2,
"fields": {
"pos": 100,
"name": "DGNum",
"pattern": "^https?://[a-z0-9.\\-]+\\.dgnum\\.(fr|eu)/.*$",
"user_field": "",
"restrict_users": false,
"proxy": false,
"proxy_callback": false,
"single_log_out": false,
"single_log_out_callback": ""
}
},
{
"model": "cas_server.servicepattern",
"pk": 3,
"fields": {
"pos": 90,
"name": "localhost",
"pattern": "^https?://(127\\.0\\.0\\.1|localhost)/.*$",
"user_field": "",
"restrict_users": false,
"proxy": false,
"proxy_callback": false,
"single_log_out": false,
"single_log_out_callback": ""
}
},
{
"model": "cas_server.replaceattributname",
"pk": 1,
"fields": {
"name": "mail",
"replace": "email",
"service_pattern": 1
}
},
{
"model": "cas_server.replaceattributname",
"pk": 2,
"fields": {
"name": "cn",
"replace": "",
"service_pattern": 1
}
},
{
"model": "cas_server.replaceattributname",
"pk": 3,
"fields": {
"name": "homeDirectory",
"replace": "",
"service_pattern": 1
}
},
{
"model": "cas_server.replaceattributname",
"pk": 4,
"fields": {
"name": "gecos",
"replace": "name",
"service_pattern": 1
}
},
{
"model": "cas_server.replaceattributname",
"pk": 5,
"fields": {
"name": "gecos",
"replace": "name",
"service_pattern": 2
}
},
{
"model": "cas_server.replaceattributname",
"pk": 6,
"fields": {
"name": "mail",
"replace": "email",
"service_pattern": 2
}
},
{
"model": "cas_server.replaceattributname",
"pk": 7,
"fields": {
"name": "cn",
"replace": "",
"service_pattern": 2
}
},
{
"model": "cas_server.replaceattributname",
"pk": 8,
"fields": {
"name": "homeDirectory",
"replace": "",
"service_pattern": 2
}
},
{
"model": "cas_server.replaceattributname",
"pk": 9,
"fields": {
"name": "*",
"replace": "",
"service_pattern": 3
}
}
]