Skip to content

Commit

Permalink
creators may delete their talks
Browse files Browse the repository at this point in the history
  • Loading branch information
schmidma committed Nov 19, 2024
1 parent 25b9c4e commit 73a71e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ fn get_talk(talks: &mut BTreeMap<usize, Talk>, talk_id: usize) -> Result<&mut Ta
async fn remove_talk(state: &AppState, talk_id: usize, user: &User) -> Result<()> {
let talks = &mut state.storage.write().await.talks;
let talk = get_talk(talks, talk_id)?;
if !(user.is_editor() || user.is_scheduler()) {
if !(user.is_editor() || user.is_scheduler() || user.is_creator(talk)) {
bail!("user cannot edit talk with id {talk_id}");
}
let id = talk.id;
Expand Down

0 comments on commit 73a71e0

Please sign in to comment.