-
Notifications
You must be signed in to change notification settings - Fork 20
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
Event: Allow host to add cohosts #1925
Conversation
a0591d8
to
22e430d
Compare
22e430d
to
98ece89
Compare
What is a "cohost"? I feel like that question has not been answered. Is "cohost" status a meaningless gold star? Or is it intended to confer some permissions on the person? Why would we want to have "cohosts" rather than having multiple "hosts"? |
My bad, let me explain
The idea for multiple hosts never came up before during the discussion. Tagging @tompollard and @alistairewj for feedback on multiple hosts. |
I think we'd want to avoid multiple hosts to avoid having multiple users with permission to update event content (similar to the role of the corresponding author in projects). |
Okay, yeah, I see this was mentioned briefly in issue #1839. This needs further discussion, I'm not really comfortable with being able to grant permissions over data access control so casually. |
@alistairewj: this is true, though only allowing a single person to edit is often annoying and it'd be better if we could avoid that. |
@alistairewj @bemoody @tompollard i remember we wanted to meetup do discuss about Events anyway, I was trying to setup the meeting, but i was unable to because i couldn't get everyone's availability. So brining this up to setup meeting as looks like we need to discuss/plan bunch of things :) Also sorry i couldn't find all 3 of your on Slack so brought this up here |
98ece89
to
bfe40e4
Compare
Email templates for reference For Make Cohost
For Remove Cohost
|
e9bed5c
to
53ab4bb
Compare
53ab4bb
to
1135c7d
Compare
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.
I did an initial review. There is a lot more coming up, but I wanted to give you some immediate pointers @Rutvikrj26
physionet-django/events/templates/events/email/event_cohost_cohost_status_change.html
Show resolved
Hide resolved
physionet-django/events/templates/events/email/event_cohost_cohost_status_change.html
Outdated
Show resolved
Hide resolved
physionet-django/events/templates/events/email/event_host_cohost_status_change.html
Outdated
Show resolved
Hide resolved
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.
Sorry for a late review - I'm leaving some comments. If you need more context then let me know Rutvik, we can even jump on a call.
physionet-django/events/templates/events/email/event_cohost_cohost_status_change.html
Show resolved
Hide resolved
physionet-django/events/templates/events/email/event_cohost_cohost_status_change.html
Outdated
Show resolved
Hide resolved
109a4ee
to
08f5c4f
Compare
@Rutvikrj26 This requires a backmerge/rebase. |
The view will be used by ajax request which will be sent from event_home.html.
Here, when event host clicks the `Make Cohost` or the `Remove Cohost` button, 1. we will immediately disable the button(so that host cant spam the button), it also acts like a feedback to host that the task is processing. 2. Then we send ajax request to our view 3. Depending on the response from view, a. If successfull, we will either change the button from `Make Cohost` to `Remove Cohost` or vice versa(depending on whether the host was trying to make cohost or remove cohost) b. If unsuccessfull, we will enable the button again to allow host to try again.
Whenever a host adds or removes a cohost to the event, email notification are sent to a) host and b) the added/removed cohost
…_ajax depreceation issue
693624a
to
fc4599c
Compare
physionet-django/console/templates/console/event_management.html
Outdated
Show resolved
Hide resolved
physionet-django/events/templates/events/event_applications.html
Outdated
Show resolved
Hide resolved
@kshalot @tompollard |
Sorry to say this so late in the day, but I feel like an "invite co-host" button somewhere might be cleaner (both for user and implementation-wise). |
As discussed during the regular Standup, this feature implementation needs to be redone for security issues. |
This Pull Request implements the feature to add cohosts for an event. This PR is a continuation of the Cohost PR : #1925 The feature has been implemented in a similar fashion to how the author Invitation is handled currently. Cohosts are supposed to be helper for hosts and can manage the participants (approving, rejecting participants) To be cohost, one has to be first approved to join the event. Worflow: When a host opens the event page, the host will be able to see the option to invite a user as a cohost. ![event-cohost-form](https://github.com/MIT-LCP/physionet-build/assets/46196557/80246cc7-03a9-4c70-a32e-55a8f89cd01e) The person invited gets an email for cohost Invitation: ![cohost-invitation-email](https://github.com/MIT-LCP/physionet-build/assets/46196557/6f4db845-7c27-46f1-a19d-df131e24c511) The person sees the invitation on the specific event's page. ![cohost-request](https://github.com/MIT-LCP/physionet-build/assets/46196557/56faa1b0-6c4f-4b60-bec3-fb52c7de7b8f) ![cohost-request-accept](https://github.com/MIT-LCP/physionet-build/assets/46196557/6e976a09-b16a-4a40-9896-89dc20ec0cb1) When the person accepts, the host gets an email that the person has accepted the cohost invitation. The form runs the check if the user is a participant in the event and prohibits inviting a random user as the last one implemented.
Related to #1901
Context
On #1901, we reverted the add cohost feature because of security issue.
On this PR we reimplement the feature by using forms
Cohosts are supposed to be helper for hosts and can manage the participants(approving, rejecting participants)
To be cohost, one has to be first approved to join the event.
Workflow
The event host clicks the
Make Cohost
or theRemove Cohost
button, and the following will happena. If successful, we will either change the button from
Make Cohost
toRemove Cohost
or vice versa(depending on whether the host was trying to make cohost or remove cohost)b. If unsuccessful, we will enable the button again to allow host to try again.
Screen Record for quick review
Screen.Recording.3-8-2023.at.05.01.PM.webm