Code review comment for lp:~jcsackett/launchpad/set-question-message-visibility

Revision history for this message
Curtis Hovey (sinzui) wrote :

Hi JC.

I am very excited to see Questions over the API. I have a few trivial requests and a question.

The setCommentVisibility method's docstring does not conform to PEP 257. I expect to see a single line with an optional paragraph of further information.

IQuestion.priority is unused. We do not want this exported.

I do not see a security checker set for IQuestionMessage in security.py. In the past, this prevented anonymous users from getting the object. That is to say question.messages is always an empty list. Is this true when you access the list as anon? The fix to security.py is pretty trivial:

{{{
class ViewQuestionMessage(AnonymousAuthorization):
    """Anyone can view an IQustionMessage."""
    usedfor = IQuestionMessage
}}}

However, I think this will show visible and hidden the comments over the API. I am unsure if this is an issue. You may want to override the checkUnauthenticated() method.

review: Needs Information (code)

« Back to merge proposal