Merge lp:~jcsackett/launchpad/no-questions-on-disabled into lp:launchpad
Status: | Merged |
---|---|
Approved by: | Curtis Hovey |
Approved revision: | no longer in the source branch. |
Merged at revision: | 16356 |
Proposed branch: | lp:~jcsackett/launchpad/no-questions-on-disabled |
Merge into: | lp:launchpad |
Diff against target: |
108 lines (+44/-1) 3 files modified
lib/lp/answers/browser/question.py (+13/-1) lib/lp/answers/browser/tests/test_question.py (+18/-0) lib/lp/answers/templates/question-add-search.pt (+13/-0) |
To merge this branch: | bzr merge lp:~jcsackett/launchpad/no-questions-on-disabled |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Curtis Hovey (community) | code | Approve | |
Review via email: mp+138360@code.launchpad.net |
Commit message
Updates addquestion UI to indicate when questions is not enabled.
Description of the change
Summary
=======
We don't want questions to be asked on private products, because there is no
concept of a private question and answers cannot be enabled for private
projects. The addquestion UI is not aware of service usage, and can still be
accessed via simply hacking together the +addquestion url.
We should do the same thing +filebug does, and indicate that answers is not
enabled, and if the user has the permission to do, let them go change that.
As LAUNCHPAD is not an option for private projects, this will still not allow
a user to create a leak.
Preimp
======
Spoke with Rick Harding.
Implementation
==============
The addquestion view gets a new method that checks if answes is enabled. If
its not, the ui is altered to display a message similar to the one shown by
+filebug if malone is not enabled.
Tests
=====
bin/test -vvct test_context_
QA
==
Go to +addquestion on a product with answers disabled. You should see the
message indicating you cannot ask a question.
LoC
===
Part of private projects.
Lint
====
Checking for conflicts and issues in changed files.
Linting changed files:
lib/lp/
lib/lp/
lib/lp/
Thank you.