Let users with submit_as permission list non-public review requests.
Review Request #7196 — Created April 11, 2015 and submitted
Until now,
rbt post
with the submit-as option could not update unpublished review requests. I've proposed that users with thecan_submit_as_another_user
permission are allowed to list unpublished review requests, so thatrbt post
knows about these and can update them. Previously only superusers could list unpublished review requests.
- Expanded unit test to test that
can_submit_as_another_user
gives user access to unpublished review requests - Tested with
rbt post -u --submit-as=submitter
to update unpublished review request (see also #7195)
Description | From | Last Updated |
---|---|---|
This will need to take the local_site parameter as well. |
chipx86 | |
There is a possibility that the url will have show-all-unpublished=0, so this should probably use request.GET.get('show-all-unpublished', False) instead. |
brennie | |
We actually should probably coerce this to an integer. If show-all-unpublished=0 is given in the URL, then request_unpublished will be … |
brennie | |
Can we assign request.GET.get('show-all-unpublished, '0') to a variable (e.g. show_all_unpublished) before doing the in operation so that we don't need … |
brennie | |
Can you pull this out into a separate test method? |
david |
- Change Summary:
-
Added local_site as argument to has_perm.
- Commit:
-
be41b96761c538fd29a5414cfd5d57d7e23f4d35c831c642aa91703a48c1e39f2d62e82bb08a6388
-
Tool: Pyflakes Processed Files: reviewboard/webapi/resources/review_request.py reviewboard/webapi/tests/test_review_request.py Tool: PEP8 Style Checker Processed Files: reviewboard/webapi/resources/review_request.py reviewboard/webapi/tests/test_review_request.py
- Change Summary:
-
Don't show unpublished reivew requests if
show-all-unpublished
is (e.g.) 0. - Commit:
-
c831c642aa91703a48c1e39f2d62e82bb08a63881b401f7654f92967645c00c52850df08200be87f
-
Tool: Pyflakes Processed Files: reviewboard/webapi/resources/review_request.py reviewboard/webapi/tests/test_review_request.py Tool: PEP8 Style Checker Processed Files: reviewboard/webapi/resources/review_request.py reviewboard/webapi/tests/test_review_request.py
-
Tool: Pyflakes Processed Files: reviewboard/webapi/resources/review_request.py reviewboard/webapi/tests/test_review_request.py Tool: PEP8 Style Checker Processed Files: reviewboard/webapi/resources/review_request.py reviewboard/webapi/tests/test_review_request.py