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
feat: add field for email exception in speaker schema #6209
feat: add field for email exception in speaker schema #6209
Conversation
87e0e7c
to
363c58a
Compare
Codecov Report
@@ Coverage Diff @@
## development #6209 +/- ##
===============================================
- Coverage 65.97% 65.93% -0.04%
===============================================
Files 288 288
Lines 14538 14552 +14
===============================================
+ Hits 9591 9595 +4
- Misses 4947 4957 +10
Continue to review full report at Codecov.
|
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.
Won't you need to make changes in schema too, As email is required field for a speaker or are we going to use organiser email?
We are going to use organizer's email. @kushthedude |
@kushthedude @mrsaicharan1 @uds5501 this PR is up for review. |
raise ForbiddenException({'pointer': 'data/attributes/is_email_overriden'}, | ||
'Co-organizer access required to override email') | ||
elif has_access('is_coorganizer', event_id=data['event']) and data.get('is_email_overriden'): | ||
data['email'] = current_user.email |
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.
If email is overridden, then when is this email used?
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.
If email is overriden then organizer's email is used. I'm adding this line so that we don't depend solely on client to send email.
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.
Yeah, but in above functions, you don't send email if it is overriden. Reason?
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.
Oh I misread your first question. This email acts as a dummy to satisfy the schema constraints (as email cannot be null) and can have secondary use to let us know which co-organizer added him/her.
And we are not sending email because it will act as a spam to organizer since he is already getting every notif and email.
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.
Then only change data['email'] if it is not present. Or else, it is wrong info. Also, if someone disables email override, you will now definitely spam the organizer
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.
Updated the logic and updated data['email'] only if it isn't present
mute notifications and mails for overriden speakers adds checks fixes travis removes redundant None in data.get update permission to organizer access update email logic
bc3f399
to
e11fbac
Compare
Fixes #6059
Short description of what this resolves:
When a speaker registers they have to enter an email. It must be possible to override this requirement for organizers/admins, e.g. if a VIP speaker does not want to sign up himself
Changes proposed in this pull request:
Checklist
development
branch.