Bug 1086506

Summary: Access policy editor: adding non-exist user should not display internal server error
Product: [Retired] Beaker Reporter: matt jia <mjia>
Component: web UIAssignee: matt jia <mjia>
Status: CLOSED CURRENTRELEASE QA Contact: tools-bugs <tools-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 0.16CC: aigao, asaha, dcallagh, luliu, rmancy
Target Milestone: 0.17Keywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-10 23:28:15 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.