diff --git a/src/admin.rs b/src/admin.rs index 5c1650d..dd2988f 100644 --- a/src/admin.rs +++ b/src/admin.rs @@ -69,13 +69,10 @@ struct AdminOverview { linked_accounts: i64, total_filesize: i64, recent_media: i64, - - ingest_rate_graph: bool, } #[get("", name = "admin_overview")] async fn admin_overview( - unleash: web::Data, conn: web::Data, request: actix_web::HttpRequest, user: models::User, @@ -94,11 +91,6 @@ async fn admin_overview( linked_accounts: stats.linked_accounts, total_filesize: stats.total_filesize, recent_media: stats.recent_media, - ingest_rate_graph: unleash.is_enabled( - crate::Features::AdminIngestRate, - Some(&user.context()), - false, - ), } .wrap_admin(&request, &user) .await diff --git a/src/api.rs b/src/api.rs index 8481b03..1709e63 100644 --- a/src/api.rs +++ b/src/api.rs @@ -282,7 +282,6 @@ async fn events( #[get("/ingest/stats")] async fn ingest_stats( - unleash: web::Data, user: models::User, nats: web::Data, ) -> impl actix_web::Responder { @@ -290,14 +289,6 @@ async fn ingest_stats( return Err(Error::Unauthorized); } - if !unleash.is_enabled( - crate::Features::AdminIngestRate, - Some(&user.context()), - false, - ) { - return Err(Error::Unauthorized); - } - let (tx, rx) = tokio::sync::mpsc::channel::>(10); tokio::task::spawn_local( diff --git a/src/main.rs b/src/main.rs index fb14413..80b718b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -346,12 +346,8 @@ impl<'de> Deserialize<'de> for UrlUuid { #[derive(Clone, Debug, Serialize, Deserialize, enum_map::Enum)] enum Features { - #[serde(rename = "fuzzysearch.owo.merge-media")] - MergeMedia, #[serde(rename = "fuzzysearch.owo.webauthn")] Webauthn, - #[serde(rename = "fuzzysearch.owo.admin-ingest-rate")] - AdminIngestRate, } type Unleash = foxlib::flags::Unleash; diff --git a/src/user.rs b/src/user.rs index d277a86..285bd59 100644 --- a/src/user.rs +++ b/src/user.rs @@ -675,7 +675,6 @@ struct MediaView<'a> { similar_image_events: &'a [(chrono::DateTime, models::SimilarImage)], other_events: &'a [models::UserEvent], allowlisted_users: HashMap<(Site, String), Uuid>, - merge_enabled: bool, similar_media: Vec, } @@ -683,7 +682,6 @@ struct MediaView<'a> { async fn media_view( request: actix_web::HttpRequest, conn: web::Data, - unleash: web::Data, path: web::Path<(UrlUuid,)>, user: models::User, ) -> Result { @@ -735,7 +733,6 @@ async fn media_view( similar_image_events: &similar_events, other_events: &other_events, allowlisted_users, - merge_enabled: unleash.is_enabled(Features::MergeMedia, Some(&user.context()), false), similar_media, } .wrap(&request, Some(&user)) @@ -749,19 +746,12 @@ async fn media_view( async fn media_merge( conn: web::Data, s3: web::Data, - unleash: web::Data, config: web::Data, request: actix_web::HttpRequest, session: actix_session::Session, user: models::User, form: web::Form>, ) -> Result { - if !unleash.is_enabled(Features::MergeMedia, Some(&user.context()), false) { - return Ok(HttpResponse::Found() - .insert_header(("Location", request.url_for_static("user_home")?.as_str())) - .finish()); - } - let mut kvs: HashMap> = HashMap::new(); for (name, value) in form.0 { if let Ok(value_id) = value.parse() { diff --git a/templates/admin/overview.html b/templates/admin/overview.html index 6413f3a..465f7e7 100644 --- a/templates/admin/overview.html +++ b/templates/admin/overview.html @@ -36,7 +36,6 @@ - {% if ingest_rate_graph %}
@@ -44,5 +43,4 @@
- {% endif %} diff --git a/templates/user/media/view.html b/templates/user/media/view.html index 9762a26..83d82a6 100644 --- a/templates/user/media/view.html +++ b/templates/user/media/view.html @@ -30,7 +30,7 @@