1
0
mirror of https://github.com/quay/quay.git synced 2025-07-30 07:43:13 +03:00

Add Feature flag to whitelist users from recaptcha check(PROJQUAY-3697) (#1454)

Signed-off-by: harishsurf <hgovinda@redhat.com>
This commit is contained in:
Harish Govindarajulu
2022-07-22 16:18:45 -04:00
committed by GitHub
parent 9eb4fb6aa4
commit 1c8f5df6e2
7 changed files with 39 additions and 13 deletions

View File

@ -814,6 +814,12 @@ class TestCreateNewUser(ApiTestCase):
details["recaptcha_response"] = "somecode"
self.postResponse(User, data=details, expected_code=200)
def test_recaptcha_whitelisted_users(self):
self.login(READ_ACCESS_USER)
with (self.toggleFeature("RECAPTCHA", True)):
app.config["RECAPTCHA_WHITELISTED_USERS"] = READ_ACCESS_USER
self.postResponse(User, data=NEW_USER_DETAILS, expected_code=200)
def test_createuser_withteaminvite(self):
inviter = model.user.get_user(ADMIN_ACCESS_USER)
team = model.team.get_organization_team(ORGANIZATION, "owners")