Skip to content

Commit b0863c8

Browse files
committed
Modified some names.
- Legacy-Id: 14428
1 parent ec4e238 commit b0863c8

3 files changed

Lines changed: 9 additions & 4 deletions

File tree

ietf/doc/views_ballot.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
from ietf.name.models import BallotPositionName
3232
from ietf.person.models import Person
3333
from ietf.utils.mail import send_mail_text, send_mail_preformatted
34-
from ietf.utils.decorators import require_user_api_key
34+
from ietf.utils.decorators import require_api_key
3535

3636
BALLOT_CHOICES = (("yes", "Yes"),
3737
("noobj", "No Objection"),
@@ -236,10 +236,15 @@ def edit_position(request, name, ballot_id):
236236
blocking_positions=json.dumps(blocking_positions),
237237
))
238238

239-
@require_user_api_key
239+
@require_api_key
240240
@role_required('Area Director', 'Secretariat')
241241
@csrf_exempt
242242
def api_set_position(request):
243+
if request.method == 'POST':
244+
pass
245+
else:
246+
return HttpResponse("Method not allowed", status=405, content_type='text/plain')
247+
243248
return HttpResponse("Done", status=200, content_type='text/plain')
244249

245250

ietf/person/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ def email_address(self):
284284
def salt():
285285
return uuid.uuid4().bytes[:12]
286286

287-
# Manual maintenance: List all endpoints that use @require_user_api_key here
287+
# Manual maintenance: List all endpoints that use @require_api_key here
288288
PERSON_API_KEY_ENDPOINTS = [
289289
("/api/iesg/position", "/api/iesg/position"),
290290
]

ietf/utils/decorators.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def person_required(f, request, *args, **kwargs):
3535
return f(request, *args, **kwargs)
3636

3737
@decorator
38-
def require_user_api_key(f, request, *args, **kwargs):
38+
def require_api_key(f, request, *args, **kwargs):
3939

4040
def err(code, text):
4141
return HttpResponse(text, status=code, content_type='text/plain')

0 commit comments

Comments
 (0)