Skip to content

Conversation

@rjsparks
Copy link
Member

No description provided.

Copy link
Member

@jennifer-richards jennifer-richards left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops - I think I have a question about authorization. See inline

Comment on lines 2083 to 2089
doc.type_id != "draft",
group is None,
not is_doc_ietf_adoptable(doc),
doc.group.acronym == "none" and acronym is None,
doc.group.acronym == "none" and not can_adopt_draft(request.user, doc),
doc.group.acronym != "none"
and not is_authorized_in_doc_stream(request.user, doc),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The doc may not be in the "ietf" stream at this point - is there a check that the user is authorized to issue the adoption in that stream? It looks to me like it checks its current stream, but that might be a different stream. Am I missing something?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the document is not in any stream, it will be attached to the group with acronym 'none' and can_adopt_draft does the checking you are looking for.

If the document is in some stream that is not the ietf stream, the group will not be of type wg and the query at L2080 will return None, so L2084 will reject access.

If the document is in the ietf stream, the awkwardly named is_authorized_in_doc_stream will perform the check you are looking for.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I restructured the condition to hopefully make this easier to follow.

The differences between can_adopt_draft and is_authorized_in_draft_stream could probably use further refactoring, but I don't think that's a job for this PR.

Copy link
Member

@jennifer-richards jennifer-richards left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thx for the explanation, refactor makes the logic a lot clearer

@rjsparks rjsparks merged commit 56fb9b3 into ietf-tools:feat/issuewglc Nov 19, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants