diff --git a/app/templates/crate/delete.gjs b/app/templates/crate/delete.gjs index e6beb6477ff..e0ef470d234 100644 --- a/app/templates/crate/delete.gjs +++ b/app/templates/crate/delete.gjs @@ -46,7 +46,7 @@ import LoadingSpinner from 'crates-io/components/loading-spinner';
    1. the crate only has a single owner, and
    2. -
    3. the crate has been downloaded less than 500 times for each month it has been published.
    4. +
    5. the crate has been downloaded less than 1000 times for each month it has been published.
  • diff --git a/app/templates/policies/index.gjs b/app/templates/policies/index.gjs index 7c2734b1b37..689311aaa33 100644 --- a/app/templates/policies/index.gjs +++ b/app/templates/policies/index.gjs @@ -91,7 +91,7 @@ import TextContent from 'crates-io/components/text-content'; to a malicious user could have a significant impact for any existing users of your crate.

    Crate owners can delete their crates under certain conditions: the crate has been published for less than 72 - hours, or the crate only has a single owner, the crate has been downloaded less than 500 times for each month it + hours, or the crate only has a single owner, the crate has been downloaded less than 1000 times for each month it has been published, and the crate is not depended upon by any other crate on crates.io. If these conditions are not met, the crate will not be deleted. In exceptional cases crate owners may contact the crates.io team diff --git a/src/controllers/krate/delete.rs b/src/controllers/krate/delete.rs index b29804bdba9..f26932a4faf 100644 --- a/src/controllers/krate/delete.rs +++ b/src/controllers/krate/delete.rs @@ -22,7 +22,7 @@ use minijinja::context; use serde::Deserialize; use tracing::error; -const DOWNLOADS_PER_MONTH_LIMIT: u64 = 500; +const DOWNLOADS_PER_MONTH_LIMIT: u64 = 1000; const AVAILABLE_AFTER: TimeDelta = TimeDelta::hours(24); #[derive(Debug, Deserialize, FromRequestParts, utoipa::IntoParams)] @@ -45,7 +45,7 @@ impl DeleteQueryParams { /// /// The crate can only be deleted by the owner of the crate, and only if the /// crate has been published for less than 72 hours, or if the crate has a -/// single owner, has been downloaded less than 500 times for each month it has +/// single owner, has been downloaded less than 1000 times for each month it has /// been published, and is not depended upon by any other crate on crates.io. #[utoipa::path( delete, @@ -467,7 +467,7 @@ mod tests { let response = delete_crate(&user, "foo").await; assert_snapshot!(response.status(), @"422 Unprocessable Entity"); - assert_snapshot!(response.text(), @r#"{"errors":[{"detail":"only crates with less than 500 downloads per month can be deleted after 72 hours"}]}"#); + assert_snapshot!(response.text(), @r#"{"errors":[{"detail":"only crates with less than 1000 downloads per month can be deleted after 72 hours"}]}"#); assert_crate_exists(&anon, "foo", true).await; diff --git a/src/snapshots/crates_io__openapi__tests__openapi_snapshot-2.snap b/src/snapshots/crates_io__openapi__tests__openapi_snapshot-2.snap index f24f7d0488d..6c7e90967b9 100644 --- a/src/snapshots/crates_io__openapi__tests__openapi_snapshot-2.snap +++ b/src/snapshots/crates_io__openapi__tests__openapi_snapshot-2.snap @@ -2048,7 +2048,7 @@ expression: response.json() }, "/api/v1/crates/{name}": { "delete": { - "description": "The crate is immediately deleted from the database, and with a small delay\nfrom the git and sparse index, and the crate file storage.\n\nThe crate can only be deleted by the owner of the crate, and only if the\ncrate has been published for less than 72 hours, or if the crate has a\nsingle owner, has been downloaded less than 500 times for each month it has\nbeen published, and is not depended upon by any other crate on crates.io.", + "description": "The crate is immediately deleted from the database, and with a small delay\nfrom the git and sparse index, and the crate file storage.\n\nThe crate can only be deleted by the owner of the crate, and only if the\ncrate has been published for less than 72 hours, or if the crate has a\nsingle owner, has been downloaded less than 1000 times for each month it has\nbeen published, and is not depended upon by any other crate on crates.io.", "operationId": "delete_crate", "parameters": [ {