Commit eb9414d6 authored by Aurélien Bompard's avatar Aurélien Bompard

Merge branch 'fix-auth-decorators' into 'master'

Fix auth decorators



See merge request !175
parents e589e8f3 1d4ebf91
Pipeline #4019271 passed with stage
in 2 minutes and 32 seconds
......@@ -67,7 +67,7 @@ interactions:
headers:
content-length: ['0']
content-type: [application/json; charset=UTF-8]
location: ['http://localhost:9001/3.0/members/11']
location: ['http://localhost:9001/3.0/members/5247']
status: {code: 201, message: Created}
- request:
body: !!python/unicode list_id=foo.example.com&role=moderator&subscriber=moderator%40example.com
......@@ -81,7 +81,7 @@ interactions:
headers:
content-length: ['0']
content-type: [application/json; charset=UTF-8]
location: ['http://localhost:9001/3.0/members/12']
location: ['http://localhost:9001/3.0/members/5248']
status: {code: 201, message: Created}
- request:
body: null
......@@ -106,13 +106,13 @@ interactions:
uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner
response:
body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/owner@example.com",
"delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"c2b18ddd796ebc33a86d17c5b933173e7a8fe36b\"",
"list_id": "foo.example.com", "member_id": 11, "moderation_action": "accept",
"role": "owner", "self_link": "http://localhost:9001/3.0/members/11", "user":
"http://localhost:9001/3.0/users/7"}], "http_etag": "\"644592bc6be63a3c3fbc937509c2f2cec4b67823\"",
"delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"6b62cad4df41d75c652a343a6dd319eda41a1e60\"",
"list_id": "foo.example.com", "member_id": 5247, "moderation_action": "accept",
"role": "owner", "self_link": "http://localhost:9001/3.0/members/5247", "user":
"http://localhost:9001/3.0/users/3324"}], "http_etag": "\"0b0edc8effb07f8aaecf3b7d389cc2599252a4fa\"",
"start": 0, "total_size": 1}'}
headers:
content-length: ['485']
content-length: ['492']
content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
......@@ -124,13 +124,13 @@ interactions:
response:
body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/moderator@example.com",
"delivery_mode": "regular", "email": "moderator@example.com", "http_etag":
"\"f98b983b2f49dc4b14034de7e8ab3405473e8c88\"", "list_id": "foo.example.com",
"member_id": 12, "moderation_action": "accept", "role": "moderator", "self_link":
"http://localhost:9001/3.0/members/12", "user": "http://localhost:9001/3.0/users/8"}],
"http_etag": "\"d60d311365e89160e2be663f30bd7aab7d4d1a64\"", "start": 0, "total_size":
"\"2aafe79065b818fa91866260a0f4d8042276bfb2\"", "list_id": "foo.example.com",
"member_id": 5248, "moderation_action": "accept", "role": "moderator", "self_link":
"http://localhost:9001/3.0/members/5248", "user": "http://localhost:9001/3.0/users/3325"}],
"http_etag": "\"a8f6b9feb975168c4e8edb44ec8f6567a5c27ee7\"", "start": 0, "total_size":
1}'}
headers:
content-length: ['497']
content-length: ['504']
content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
......@@ -153,7 +153,7 @@ interactions:
headers:
accept-encoding: ['gzip, deflate']
method: !!python/unicode GET
uri: http://localhost:9001/3.0/lists/foo@example.com/roster/member?count=1&page=1
uri: http://localhost:9001/3.0/lists/foo@example.com/roster/member?count=0&page=1
response:
body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"",
"start": 0, "total_size": 0}'}
......@@ -209,14 +209,14 @@ interactions:
uri: http://localhost:9001/3.0/users
response:
body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23",
"http_etag": "\"c7360c029a83c97672ca38dd8b008d48e05949a6\"", "is_server_owner":
false, "self_link": "http://localhost:9001/3.0/users/7", "user_id": 7}, {"created_on":
"2005-08-01T07:49:23", "http_etag": "\"9f85bec9adf1f795257120c028ebcd42df491bcb\"",
"is_server_owner": false, "self_link": "http://localhost:9001/3.0/users/8",
"user_id": 8}], "http_etag": "\"6d79d8839102712f649497295042532321f7a937\"",
"http_etag": "\"0c63e5a308dcb2f4a43709f5017838e44dcec935\"", "is_server_owner":
false, "self_link": "http://localhost:9001/3.0/users/3324", "user_id": 3324},
{"created_on": "2005-08-01T07:49:23", "http_etag": "\"723f8681dc57aaaab3f93451ffd66916a77a03ef\"",
"is_server_owner": false, "self_link": "http://localhost:9001/3.0/users/3325",
"user_id": 3325}], "http_etag": "\"e80538a9190227d8fed7722d4cfe0454c810e0fe\"",
"start": 0, "total_size": 2}'}
headers:
content-length: ['483']
content-length: ['495']
content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
......@@ -224,7 +224,7 @@ interactions:
headers:
accept-encoding: ['gzip, deflate']
method: !!python/unicode DELETE
uri: http://localhost:9001/3.0/users/7
uri: http://localhost:9001/3.0/users/3324
response:
body: {string: !!python/unicode ''}
headers:
......@@ -235,7 +235,7 @@ interactions:
headers:
accept-encoding: ['gzip, deflate']
method: !!python/unicode DELETE
uri: http://localhost:9001/3.0/users/8
uri: http://localhost:9001/3.0/users/3325
response:
body: {string: !!python/unicode ''}
headers:
......
......@@ -67,7 +67,7 @@ interactions:
headers:
content-length: ['0']
content-type: [application/json; charset=UTF-8]
location: ['http://localhost:9001/3.0/members/13']
location: ['http://localhost:9001/3.0/members/5249']
status: {code: 201, message: Created}
- request:
body: !!python/unicode list_id=foo.example.com&role=moderator&subscriber=moderator%40example.com
......@@ -81,7 +81,7 @@ interactions:
headers:
content-length: ['0']
content-type: [application/json; charset=UTF-8]
location: ['http://localhost:9001/3.0/members/14']
location: ['http://localhost:9001/3.0/members/5250']
status: {code: 201, message: Created}
- request:
body: null
......@@ -103,7 +103,7 @@ interactions:
headers:
accept-encoding: ['gzip, deflate']
method: !!python/unicode GET
uri: http://localhost:9001/3.0/lists/foo@example.com/roster/member?count=1&page=1
uri: http://localhost:9001/3.0/lists/foo@example.com/roster/member?count=0&page=1
response:
body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"",
"start": 0, "total_size": 0}'}
......@@ -159,14 +159,14 @@ interactions:
uri: http://localhost:9001/3.0/users
response:
body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23",
"http_etag": "\"d3653a82ed2e228300cde355e9d15020657bfb86\"", "is_server_owner":
false, "self_link": "http://localhost:9001/3.0/users/9", "user_id": 9}, {"created_on":
"2005-08-01T07:49:23", "http_etag": "\"40c88498622198c212181e9ff106e60a3cba46ed\"",
"is_server_owner": false, "self_link": "http://localhost:9001/3.0/users/10",
"user_id": 10}], "http_etag": "\"932fe2d6b99ecd15c16ca34c98d760ed33d42bea\"",
"http_etag": "\"111a2fa3214e445738cdc4b1acabdf1e0ae42fb8\"", "is_server_owner":
false, "self_link": "http://localhost:9001/3.0/users/3326", "user_id": 3326},
{"created_on": "2005-08-01T07:49:23", "http_etag": "\"33d9ad2ad32556cb21f8b7fd5fa51fb10f214496\"",
"is_server_owner": false, "self_link": "http://localhost:9001/3.0/users/3327",
"user_id": 3327}], "http_etag": "\"f2608d0c6c29e947f30fc2b124349697f5a36c7a\"",
"start": 0, "total_size": 2}'}
headers:
content-length: ['485']
content-length: ['495']
content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
......@@ -174,7 +174,7 @@ interactions:
headers:
accept-encoding: ['gzip, deflate']
method: !!python/unicode DELETE
uri: http://localhost:9001/3.0/users/10
uri: http://localhost:9001/3.0/users/3326
response:
body: {string: !!python/unicode ''}
headers:
......@@ -185,7 +185,7 @@ interactions:
headers:
accept-encoding: ['gzip, deflate']
method: !!python/unicode DELETE
uri: http://localhost:9001/3.0/users/9
uri: http://localhost:9001/3.0/users/3327
response:
body: {string: !!python/unicode ''}
headers:
......
......@@ -67,7 +67,7 @@ interactions:
headers:
content-length: ['0']
content-type: [application/json; charset=UTF-8]
location: ['http://localhost:9001/3.0/members/19']
location: ['http://localhost:9001/3.0/members/5255']
status: {code: 201, message: Created}
- request:
body: !!python/unicode display_name=None&list_id=foo.example.com&pre_approved=True&pre_confirmed=True&pre_verified=True&subscriber=member-2%40example.com
......@@ -81,7 +81,7 @@ interactions:
headers:
content-length: ['0']
content-type: [application/json; charset=UTF-8]
location: ['http://localhost:9001/3.0/members/20']
location: ['http://localhost:9001/3.0/members/5256']
status: {code: 201, message: Created}
- request:
body: null
......@@ -103,16 +103,12 @@ interactions:
headers:
accept-encoding: ['gzip, deflate']
method: !!python/unicode GET
uri: http://localhost:9001/3.0/members/find?count=1&list_id=foo.example.com&page=1&role=member&subscriber=%2Aexample.com%2A
uri: http://localhost:9001/3.0/members/find?count=0&list_id=foo.example.com&page=1&role=member&subscriber=%2Aexample.com%2A
response:
body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/member-1@example.com",
"delivery_mode": "regular", "email": "member-1@example.com", "http_etag":
"\"7c54807133c6e2f3eab6f206553f163b718ed002\"", "list_id": "foo.example.com",
"member_id": 19, "role": "member", "self_link": "http://localhost:9001/3.0/members/19",
"user": "http://localhost:9001/3.0/users/15"}], "http_etag": "\"94a21db2ed8b25aea2374f33e353d5fbc32086c4\"",
body: {string: !!python/unicode '{"http_etag": "\"f14dfdb06627a6336a504885e036239a5b208434\"",
"start": 0, "total_size": 2}'}
headers:
content-length: ['462']
content-length: ['90']
content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
......@@ -124,16 +120,16 @@ interactions:
response:
body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/member-1@example.com",
"delivery_mode": "regular", "email": "member-1@example.com", "http_etag":
"\"7c54807133c6e2f3eab6f206553f163b718ed002\"", "list_id": "foo.example.com",
"member_id": 19, "role": "member", "self_link": "http://localhost:9001/3.0/members/19",
"user": "http://localhost:9001/3.0/users/15"}, {"address": "http://localhost:9001/3.0/addresses/member-2@example.com",
"\"a03b4e7b13007d4149ce193daf1f20a1f369ff3e\"", "list_id": "foo.example.com",
"member_id": 5255, "role": "member", "self_link": "http://localhost:9001/3.0/members/5255",
"user": "http://localhost:9001/3.0/users/3332"}, {"address": "http://localhost:9001/3.0/addresses/member-2@example.com",
"delivery_mode": "regular", "email": "member-2@example.com", "http_etag":
"\"84a00da5f6ec113989ce06dafa100eeae2c16b96\"", "list_id": "foo.example.com",
"member_id": 20, "role": "member", "self_link": "http://localhost:9001/3.0/members/20",
"user": "http://localhost:9001/3.0/users/16"}], "http_etag": "\"2d42e9fb2c2cab6743eee759633837dc74195371\"",
"\"d2aa98220bcce771276847adf45b48f8956f2331\"", "list_id": "foo.example.com",
"member_id": 5256, "role": "member", "self_link": "http://localhost:9001/3.0/members/5256",
"user": "http://localhost:9001/3.0/users/3333"}], "http_etag": "\"11b34b6e4b0f3344ad73c51e9996d053e0e52db9\"",
"start": 0, "total_size": 2}'}
headers:
content-length: ['821']
content-length: ['833']
content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
......@@ -141,15 +137,15 @@ interactions:
headers:
accept-encoding: ['gzip, deflate']
method: !!python/unicode GET
uri: http://localhost:9001/3.0/members/19
uri: http://localhost:9001/3.0/members/5255
response:
body: {string: !!python/unicode '{"address": "http://localhost:9001/3.0/addresses/member-1@example.com",
"delivery_mode": "regular", "email": "member-1@example.com", "http_etag":
"\"7c54807133c6e2f3eab6f206553f163b718ed002\"", "list_id": "foo.example.com",
"member_id": 19, "role": "member", "self_link": "http://localhost:9001/3.0/members/19",
"user": "http://localhost:9001/3.0/users/15"}'}
"\"a03b4e7b13007d4149ce193daf1f20a1f369ff3e\"", "list_id": "foo.example.com",
"member_id": 5255, "role": "member", "self_link": "http://localhost:9001/3.0/members/5255",
"user": "http://localhost:9001/3.0/users/3332"}'}
headers:
content-length: ['357']
content-length: ['363']
content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
......@@ -157,15 +153,15 @@ interactions:
headers:
accept-encoding: ['gzip, deflate']
method: !!python/unicode GET
uri: http://localhost:9001/3.0/members/20
uri: http://localhost:9001/3.0/members/5256
response:
body: {string: !!python/unicode '{"address": "http://localhost:9001/3.0/addresses/member-2@example.com",
"delivery_mode": "regular", "email": "member-2@example.com", "http_etag":
"\"84a00da5f6ec113989ce06dafa100eeae2c16b96\"", "list_id": "foo.example.com",
"member_id": 20, "role": "member", "self_link": "http://localhost:9001/3.0/members/20",
"user": "http://localhost:9001/3.0/users/16"}'}
"\"d2aa98220bcce771276847adf45b48f8956f2331\"", "list_id": "foo.example.com",
"member_id": 5256, "role": "member", "self_link": "http://localhost:9001/3.0/members/5256",
"user": "http://localhost:9001/3.0/users/3333"}'}
headers:
content-length: ['357']
content-length: ['363']
content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
......@@ -188,16 +184,12 @@ interactions:
headers:
accept-encoding: ['gzip, deflate']
method: !!python/unicode GET
uri: http://localhost:9001/3.0/members/find?count=1&list_id=foo.example.com&page=1&role=member&subscriber=%2Amember-1%2A
uri: http://localhost:9001/3.0/members/find?count=0&list_id=foo.example.com&page=1&role=member&subscriber=%2Amember-1%2A
response:
body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/member-1@example.com",
"delivery_mode": "regular", "email": "member-1@example.com", "http_etag":
"\"7c54807133c6e2f3eab6f206553f163b718ed002\"", "list_id": "foo.example.com",
"member_id": 19, "role": "member", "self_link": "http://localhost:9001/3.0/members/19",
"user": "http://localhost:9001/3.0/users/15"}], "http_etag": "\"1471f8314fcac157588d326b1f17fdf19ad9a62d\"",
body: {string: !!python/unicode '{"http_etag": "\"b21094769c757b95dc05bd978b7e78fabe490b0c\"",
"start": 0, "total_size": 1}'}
headers:
content-length: ['462']
content-length: ['90']
content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
......@@ -209,12 +201,12 @@ interactions:
response:
body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/member-1@example.com",
"delivery_mode": "regular", "email": "member-1@example.com", "http_etag":
"\"7c54807133c6e2f3eab6f206553f163b718ed002\"", "list_id": "foo.example.com",
"member_id": 19, "role": "member", "self_link": "http://localhost:9001/3.0/members/19",
"user": "http://localhost:9001/3.0/users/15"}], "http_etag": "\"1471f8314fcac157588d326b1f17fdf19ad9a62d\"",
"\"a03b4e7b13007d4149ce193daf1f20a1f369ff3e\"", "list_id": "foo.example.com",
"member_id": 5255, "role": "member", "self_link": "http://localhost:9001/3.0/members/5255",
"user": "http://localhost:9001/3.0/users/3332"}], "http_etag": "\"b56ddcf45c0294fc08fa6e3a5ffc70e307a65ea7\"",
"start": 0, "total_size": 1}'}
headers:
content-length: ['462']
content-length: ['468']
content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
......@@ -237,7 +229,7 @@ interactions:
headers:
accept-encoding: ['gzip, deflate']
method: !!python/unicode GET
uri: http://localhost:9001/3.0/members/find?count=1&list_id=foo.example.com&page=1&role=member&subscriber=%2Anot_a_member%2A
uri: http://localhost:9001/3.0/members/find?count=0&list_id=foo.example.com&page=1&role=member&subscriber=%2Anot_a_member%2A
response:
body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"",
"start": 0, "total_size": 0}'}
......@@ -300,7 +292,7 @@ interactions:
headers:
accept-encoding: ['gzip, deflate']
method: !!python/unicode GET
uri: http://localhost:9001/3.0/members/find?count=1&list_id=foo.example.com&page=1&role=member&subscriber=%2Amember-1%2A
uri: http://localhost:9001/3.0/members/find?count=0&list_id=foo.example.com&page=1&role=member&subscriber=%2Amember-1%2A
response:
body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"",
"start": 0, "total_size": 0}'}
......
......@@ -67,7 +67,7 @@ interactions:
headers:
content-length: ['0']
content-type: [application/json; charset=UTF-8]
location: ['http://localhost:9001/3.0/members/21']
location: ['http://localhost:9001/3.0/members/5257']
status: {code: 201, message: Created}
- request:
body: !!python/unicode display_name=None&list_id=foo.example.com&pre_approved=True&pre_confirmed=True&pre_verified=True&subscriber=member-2%40example.com
......@@ -81,7 +81,7 @@ interactions:
headers:
content-length: ['0']
content-type: [application/json; charset=UTF-8]
location: ['http://localhost:9001/3.0/members/22']
location: ['http://localhost:9001/3.0/members/5258']
status: {code: 201, message: Created}
- request:
body: null
......@@ -103,16 +103,12 @@ interactions:
headers:
accept-encoding: ['gzip, deflate']
method: !!python/unicode GET
uri: http://localhost:9001/3.0/lists/foo@example.com/roster/member?count=1&page=1
uri: http://localhost:9001/3.0/lists/foo@example.com/roster/member?count=0&page=1
response:
body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/member-1@example.com",
"delivery_mode": "regular", "email": "member-1@example.com", "http_etag":
"\"9644c4287fb8d3f8a6a63962d897789c52cfb9be\"", "list_id": "foo.example.com",
"member_id": 21, "role": "member", "self_link": "http://localhost:9001/3.0/members/21",
"user": "http://localhost:9001/3.0/users/15"}], "http_etag": "\"1fd1a56a33b76199959cd05685a20703754664c5\"",
body: {string: !!python/unicode '{"http_etag": "\"f14dfdb06627a6336a504885e036239a5b208434\"",
"start": 0, "total_size": 2}'}
headers:
content-length: ['462']
content-length: ['90']
content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
......@@ -124,16 +120,16 @@ interactions:
response:
body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/member-1@example.com",
"delivery_mode": "regular", "email": "member-1@example.com", "http_etag":
"\"9644c4287fb8d3f8a6a63962d897789c52cfb9be\"", "list_id": "foo.example.com",
"member_id": 21, "role": "member", "self_link": "http://localhost:9001/3.0/members/21",
"user": "http://localhost:9001/3.0/users/15"}, {"address": "http://localhost:9001/3.0/addresses/member-2@example.com",
"\"b16d3e2dcf3eb43156eda5d5a480881941226acb\"", "list_id": "foo.example.com",
"member_id": 5257, "role": "member", "self_link": "http://localhost:9001/3.0/members/5257",
"user": "http://localhost:9001/3.0/users/3332"}, {"address": "http://localhost:9001/3.0/addresses/member-2@example.com",
"delivery_mode": "regular", "email": "member-2@example.com", "http_etag":
"\"acd96e1031aac5feff0a9c34590e162dcc5c8871\"", "list_id": "foo.example.com",
"member_id": 22, "role": "member", "self_link": "http://localhost:9001/3.0/members/22",
"user": "http://localhost:9001/3.0/users/16"}], "http_etag": "\"2e1673b0754f678fad24835824e8dbf4c130f056\"",
"\"edeacebb4b500ecc23219f122031ed95d81fe030\"", "list_id": "foo.example.com",
"member_id": 5258, "role": "member", "self_link": "http://localhost:9001/3.0/members/5258",
"user": "http://localhost:9001/3.0/users/3333"}], "http_etag": "\"2652449e2cccadc2de8b4c90641bc07e5374db2b\"",
"start": 0, "total_size": 2}'}
headers:
content-length: ['821']
content-length: ['833']
content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
......@@ -141,15 +137,15 @@ interactions:
headers:
accept-encoding: ['gzip, deflate']
method: !!python/unicode GET
uri: http://localhost:9001/3.0/members/21
uri: http://localhost:9001/3.0/members/5257
response:
body: {string: !!python/unicode '{"address": "http://localhost:9001/3.0/addresses/member-1@example.com",
"delivery_mode": "regular", "email": "member-1@example.com", "http_etag":
"\"9644c4287fb8d3f8a6a63962d897789c52cfb9be\"", "list_id": "foo.example.com",
"member_id": 21, "role": "member", "self_link": "http://localhost:9001/3.0/members/21",
"user": "http://localhost:9001/3.0/users/15"}'}
"\"b16d3e2dcf3eb43156eda5d5a480881941226acb\"", "list_id": "foo.example.com",
"member_id": 5257, "role": "member", "self_link": "http://localhost:9001/3.0/members/5257",
"user": "http://localhost:9001/3.0/users/3332"}'}
headers:
content-length: ['357']
content-length: ['363']
content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
......@@ -157,15 +153,15 @@ interactions:
headers:
accept-encoding: ['gzip, deflate']
method: !!python/unicode GET
uri: http://localhost:9001/3.0/members/22
uri: http://localhost:9001/3.0/members/5258
response:
body: {string: !!python/unicode '{"address": "http://localhost:9001/3.0/addresses/member-2@example.com",
"delivery_mode": "regular", "email": "member-2@example.com", "http_etag":
"\"acd96e1031aac5feff0a9c34590e162dcc5c8871\"", "list_id": "foo.example.com",
"member_id": 22, "role": "member", "self_link": "http://localhost:9001/3.0/members/22",
"user": "http://localhost:9001/3.0/users/16"}'}
"\"edeacebb4b500ecc23219f122031ed95d81fe030\"", "list_id": "foo.example.com",
"member_id": 5258, "role": "member", "self_link": "http://localhost:9001/3.0/members/5258",
"user": "http://localhost:9001/3.0/users/3333"}'}
headers:
content-length: ['357']
content-length: ['363']
content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
......
......@@ -29,13 +29,13 @@ try:
except ImportError:
from urllib.error import HTTPError
from postorius import utils
from postorius.auth.decorators import superuser_or_403
from postorius.auth.decorators import superuser_required
from postorius.models import Domain, MailmanApiError
from postorius.forms import DomainNew
@login_required
@superuser_or_403
@superuser_required
def domain_index(request):
try:
existing_domains = Domain.objects.all()
......@@ -46,7 +46,7 @@ def domain_index(request):
@login_required
@superuser_or_403
@superuser_required
def domain_new(request):
if request.method == 'POST':
form = DomainNew(request.POST)
......@@ -71,7 +71,7 @@ def domain_new(request):
@login_required
@superuser_or_403
@superuser_required
def domain_delete(request, domain):
"""Deletes a domain but asks for confirmation first.
"""
......
......@@ -49,7 +49,7 @@ from postorius.forms import (
ListHeaderMatchForm, ListHeaderMatchFormset, MemberModeration)
from postorius.models import Domain, List, MailmanApiError, Mailman404Error
from postorius.auth.decorators import (
list_owner_required, list_moderator_required, superuser_or_403)
list_owner_required, list_moderator_required, superuser_required)
from postorius.views.generic import MailingListView
......@@ -493,7 +493,7 @@ def _get_choosable_domains(request):
@login_required
@superuser_or_403
@superuser_required
def list_new(request, template='postorius/lists/new.html'):
"""
Add a new mailing list.
......
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