You've already forked AstralRinth
forked from didirus/AstralRinth
Fix file uploading for admins (#519)
This commit is contained in:
@@ -520,6 +520,7 @@ async fn upload_file_to_version_inner(
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if !user.role.is_admin() {
|
||||||
let team_member = models::TeamMember::get_from_user_id_version(
|
let team_member = models::TeamMember::get_from_user_id_version(
|
||||||
version_id,
|
version_id,
|
||||||
user.id.into(),
|
user.id.into(),
|
||||||
@@ -542,6 +543,7 @@ async fn upload_file_to_version_inner(
|
|||||||
.to_string(),
|
.to_string(),
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
let project_id = ProjectId(version.inner.project_id.0 as u64);
|
let project_id = ProjectId(version.inner.project_id.0 as u64);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user