-
Notifications
You must be signed in to change notification settings - Fork 1.9k
feat: Addition of fields for reCAPTCHA #6044
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
app/models/setting.py
Outdated
| # CAPTCHA | ||
| # | ||
|
|
||
| #Google reCAPTCHA |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
block comment should start with '# '
|
@iamareebjamal @CosmicCoder96 @niranjan94 Please Review |
Codecov Report
@@ Coverage Diff @@
## development #6044 +/- ##
===============================================
+ Coverage 66.15% 66.17% +0.02%
===============================================
Files 285 285
Lines 14060 14069 +9
===============================================
+ Hits 9301 9310 +9
Misses 4759 4759
Continue to review full report at Codecov.
|
abhinavk96
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why 2 migration files? Please make them in a single file.
iamareebjamal
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are many captcha services, make it explicit, -> is_google_captcha_enabled, google_captcha_site_key
niranjan94
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename captcha to recaptcha. Incase we start to support multiple captcha providers in the future
app/models/setting.py
Outdated
| gs_key=None, | ||
| gs_secret=None, | ||
| gs_bucket_name=None, | ||
| is_google_recaptcha_enabled=False,google_recaptcha_site_key=None,google_recaptcha_secret_key=None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing whitespace after ','
|
@iamareebjamal @CosmicCoder96 @niranjan94 Please have a look |
migrations/versions/7388e7504caa_.py
Outdated
| # ### commands auto generated by Alembic - please adjust! ### | ||
| op.add_column('settings', sa.Column('google_recaptcha_secret_key', sa.String(), nullable=True)) | ||
| op.add_column('settings', sa.Column('google_recaptcha_site_key', sa.String(), nullable=True)) | ||
| op.add_column('settings', sa.Column('is_google_recaptcha_enabled', sa.Boolean(), nullable=False)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will fail as there's no default set
|
Solve hound issues |
|
@iamareebjamal @CosmicCoder96 @niranjan94 Please review |
|
Please first review the PRs yourself by seeing the changes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
About the boolean columns, https://github.com/fossasia/open-event-frontend/blob/development/app/models/setting.js#L46,
@kushthedude They are usually computed properties which can be toggled on the frontend, if that helps. They were implemented in the previous gateways too, such as is_stripe_activated &is_paypal_activated which are toggle buttons. Used to disable the modules temporarily.
{{ui-checkbox class='toggle' checked=isCheckedAliPay onChange=(action (mut isCheckedAliPay))}}
|
@iamareebjamal Did the requested changes, Please review. |
migrations/versions/232b13d4e86a_.py
Outdated
| # ### commands auto generated by Alembic - please adjust! ### | ||
| op.add_column('settings', sa.Column('google_recaptcha_secret', sa.String(), nullable=True)) | ||
| op.add_column('settings', sa.Column('google_recaptcha_site', sa.String(), nullable=True)) | ||
| op.add_column('settings', sa.Column('is_google_recaptcha_enabled', sa.Boolean(), nullable=False)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This migration will fail
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@iamareebjamal i specified the default value above , its not showing in migration file , what should i do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See previous PRs where default has been supplied
|
@iamareebjamal Please Review now , Added the |
Fixes #6043
Checklist
developmentbranch.Short description of what this resolves:
Changes proposed in this pull request: