Bug 1086506 - Access policy editor: adding non-exist user should not display internal server error
Summary: Access policy editor: adding non-exist user should not display internal serve...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Beaker
Classification: Retired
Component: web UI
Version: 0.16
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: 0.17
Assignee: matt jia
QA Contact: tools-bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-04-11 03:27 UTC by matt jia
Modified: 2018-02-06 00:41 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-10 23:28:15 UTC
Embargoed:


Attachments (Terms of Use)

Comment 2 Dan Callaghan 2014-04-14 01:27:35 UTC
Steps to Reproduce:
1. Go to system page for a system you own
2. Open the Access Policy tab and type in a non-existent username like "testabc"
3. Click Save Changes

Actual results:
Server request failed: INTERNAL SERVER ERROR

Expected results:
A nicer error message explaining that the username does not exist

Comment 3 Dan Callaghan 2014-04-14 01:28:31 UTC
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/flask/app.py", line 1817, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/lib/python2.6/site-packages/flask/app.py", line 1477, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/lib/python2.6/site-packages/flask/app.py", line 1381, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/lib/python2.6/site-packages/flask/app.py", line 1475, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/lib/python2.6/site-packages/flask/app.py", line 1461, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/usr/lib/python2.6/site-packages/bkr/server/flask_util.py", line 63, in wrapper
    return f(*args, **kwds)
  File "/usr/lib/python2.6/site-packages/bkr/server/systems.py", line 463, in save_system_access_policy
    everybody=rule['everybody'], permission=permission)
  File "/usr/lib/python2.6/site-packages/bkr/server/model/inventory.py", line 1409, in add_rule
    raise RuntimeError('Did you mean to pass everybody=True to add_rule?')
RuntimeError: Did you mean to pass everybody=True to add_rule?

Comment 4 Dan Callaghan 2014-04-14 01:30:18 UTC
I think this is a regression in 0.16.1 due to bug 1076322.

Comment 5 matt jia 2014-04-15 07:17:28 UTC
On gerrit:

http://gerrit.beaker-project.org/#/c/3023/

Cheers,Matt Jia

Comment 6 matt jia 2014-04-16 00:59:26 UTC
The new patch is here.

http://gerrit.beaker-project.org/#/c/3024/

Cheers, Matt Jia

Comment 9 Dan Callaghan 2014-06-02 04:39:59 UTC
This bug fix has been applied to the release-0.16 branch, however we have elected not to do another maintenance release of the 0.16.x series. This fix will be included in 0.17.0 instead.

Comment 10 Dan Callaghan 2014-06-10 23:28:15 UTC
Beaker 0.17.0 has been released.


Note You need to log in before you can comment on or make changes to this bug.