-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
fix: allows only owner and organizer to delete role-invites #6190
fix: allows only owner and organizer to delete role-invites #6190
Conversation
Codecov Report
@@ Coverage Diff @@
## development #6190 +/- ##
===============================================
- Coverage 66% 65.97% -0.03%
===============================================
Files 288 288
Lines 14521 14526 +5
===============================================
Hits 9584 9584
- Misses 4937 4942 +5
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## development #6190 +/- ##
===============================================
- Coverage 66% 65.97% -0.03%
===============================================
Files 288 288
Lines 14521 14526 +5
===============================================
Hits 9584 9584
- Misses 4937 4942 +5
Continue to review full report at Codecov.
|
app/api/role_invites.py
Outdated
@@ -135,6 +135,11 @@ def before_update_object(self, role_invite, data, view_kwargs): | |||
if not has_access('is_organizer', event_id=role_invite.event_id) and (len(list(data.keys())) > 1 or | |||
'status' not in data): | |||
raise UnprocessableEntity({'source': ''}, "You can only change your status") | |||
if 'deleted_at' in data and data['deleted_at']: |
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 not simply do data.get('deleted-at')
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 it @iamareebjamal
ddc4be1
40d5003
to
ddc4be1
Compare
Fixes #6152
Short description of what this resolves:
Currently, a user with coorganizer access to an event can delete other organizers/coorganizers/owners too.
Changes proposed in this pull request:
owner
role. Forowner
role, user must have owner access to delete itChecklist
development
branch.