#3873 Fix adding and removing user's ssh keys
Merged by pingou. Opened by pingou.
fix_adding_removing_ssh_keys  into  master

Download 3873.patch

Signed-off-by: Pierre-Yves Chibon pingou@pingoured.fr

+1. Though then I guess we might need to look into why the flask.g.fas_user objects from the test environment suffice but in a "real" instance they don't.

we might need to look into why the flask.g.fas_user objects from the test environment suffice but in a "real" instance they don't.

+1 looking at it right now

Does this affect people using non-fas auth?

+1. Though then I guess we might need to look into why the flask.g.fas_user objects from the test environment suffice but in a "real" instance they don't.

Found it, the FakeUser object in the tests has an .id attribute so things work while they don't with a real fas_user object.
Addressing this

Does this affect people using non-fas auth?

Yes

2 new commits added

  • Adjust tests' name to fit their function name so git grep works
  • Don't add an id to the FakeUser objects by default

2 new commits added

  • Adjust tests' name to fit their function name so git grep works
  • Don't add an id to the FakeUser objects by default

Code looks good, provided the tests pass.

:thumbsup:

1 new commit added

  • Pass along the user object not the fas_user and fix unit-tests accordingly

1 new commit added

  • Run black on the sources

Pull-Request has been merged by pingou

Metadata