Actions
Bug #6741
closedrudder-dev commit fails to assign tickets for non-admin users
Pull Request:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:
Description
Traceback (most recent call last): File "/usr/bin/rudder-dev", line 1058, in <module> commit(arguments['<trigraph>'], arguments['<PR_comment>']) File "/usr/bin/rudder-dev", line 771, in commit user = ask_username(trigraph) File "/usr/bin/rudder-dev", line 380, in ask_username users = get_normation_users() File "/usr/bin/rudder-dev", line 367, in get_normation_users user_list = [ u for u in users.json()['users'] if u['mail'].endswith("normation.com") ] File "/usr/lib/python2.7/site-packages/requests/models.py", line 799, in json return json.loads(self.text, **kwargs) File "/usr/lib64/python2.7/json/__init__.py", line 338, in loads return _default_decoder.decode(s) File "/usr/lib64/python2.7/json/decoder.py", line 366, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib64/python2.7/json/decoder.py", line 384, in raw_decode raise ValueError("No JSON object could be decoded") ValueError: No JSON object could be decoded
Updated by Alexis Mousset over 9 years ago
Redmine's response is a 403.
Related ticker on redmine.org: http://www.redmine.org/issues/7773.
Updated by Alexis Mousset over 9 years ago
- Subject changed from rudder-dev commit fails to assign tickets to rudder-dev commit fails to assign tickets for non-admin users
Updated by Alexis Mousset over 9 years ago
There is a call to get all members of a project, which is accessible to non-admin users, but it requires to do another request for each member to get first and last name (necessary for trigram) and email to check if it comes from normation.
http://www.rudder-project.org/redmine/projects/rudder/memberships.xml
For now, I am using a static array with the needed information.
Updated by Alexis Mousset about 9 years ago
# Get Normations users from redmine (users that can review) def get_normation_users(): #users = requests.get(REDMINE_API_URL + "/projects/" + project +"/memberships.json?name=normation.com", headers = {'X-Redmine-API-Key': REDMINE_TOKEN } ) #user_list = [ u for u in users.json()['users'] if u['mail'].endswith("normation.com") ] user_list = [{"firstname": "Matthieu", "lastname": "Cerda", "id": "9"}, {"firstname": "Benoît", "lastname": "Pecatte", "id": "170"}, {"firstname": "Vincent", "lastname": "Membré", "id": "34"}, {"firstname": "François", "lastname": "Armand", "id": "5"}, {"firstname": "Nicolas", "lastname": "Charles", "id": "4"}, {"firstname": "Jonathan", "lastname": "Clarke", "id": "6"}] return user_list
Updated by Benoît PECCATTE about 9 years ago
- Status changed from New to In progress
- Assignee set to Benoît PECCATTE
Updated by Benoît PECCATTE about 9 years ago
- Status changed from In progress to Pending technical review
- Assignee deleted (
Benoît PECCATTE) - Pull Request set to https://github.com/Normation/rudder-tools/pull/82
Updated by Benoît PECCATTE about 9 years ago
- Status changed from Pending technical review to Pending release
- % Done changed from 0 to 100
Applied in changeset rudder-tools|b5ac791d40cfbf6198c69244244e6389c6be381e.
Updated by Vincent MEMBRÉ about 9 years ago
Applied in changeset rudder-tools|c15c441477a65783b35866de8c01277a6f39e0c4.
Updated by Benoît PECCATTE about 8 years ago
- Status changed from Pending release to Released
Actions