-
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
Adding cohost permissions to view/respond to participation requests #2243
Adding cohost permissions to view/respond to participation requests #2243
Conversation
The key question here is what this means in terms of access control for event datasets. I realize that for now, event datasets don't actually make a difference to PhysioNet, but I would like to support them eventually, and there are a few things about them that that still make me uneasy. In issue #2244, I've tried to lay out what I think is needed to make this system reasonably secure and auditable - changes that I hope should be easy to implement and not cause problems for HDN either. Could you please take a look? |
… ensure proper dataacess only during the event
This should be
Couldn't this be It might be cleaner, instead, to define another function in events/templatetags/participation_status.py.
|
@bemoody I've implemented these suggestion:
Both these permissions were actually a part of Event model, I mistakenly put them to user.
That is a much cleaner implementation - I implemented a filter in the templatetags that addresses this and removed the redundant method for cohost_ids.
Wrapped the text in the condition to make it more secure. |
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.
@Rutvikrj26 I'm a little confused about this PR. The changes to the code don't seem to match the goal that you set out in the title and description ("Adding cohost permissions to view/respond to participation requests").
Side note but I don't remember why "invite co-host" form and notifications ended up being added to the "view event" page. We should definitely move them to http://localhost:8000/events/ (following a similar pattern to http://localhost:8000/projects/) at some point.
@@ -8,7 +8,7 @@ | |||
|
|||
|
|||
class PublishedProjectManager(Manager): | |||
def accessible_by(self, user): | |||
def accessible_by(self, user, include_event_datatsets=True): |
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.
typo include_event_datatsets
should be include_event_datasets
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've ran over it at least half a dozen times, but all three seem to be the exact same to me. Not sure what you're pointing to.
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 is a spelling mistake, I think? Shouldn't "datatsets" be "datasets"?
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, Thanks!!
I couldn't spot it😅
#2192 Implements the ability for an event host to add cohosts to the event. Currently cohosts don't have permissions to do anything on the platform.
This PR implements the change in the events functionality for the cohost to be able to view the participant lists, edit the event, view/respond to participation requests.
A scenario: Considering the event is held across the nation with multiple hubs, with each hub having an admin/lead. The admin for each hub is a cohost that can individually verify and approve the participant requests for the hub.