diff options
Diffstat (limited to 'server/src/ui')
-rw-r--r-- | server/src/ui/account/mod.rs | 2 | ||||
-rw-r--r-- | server/src/ui/account/settings.rs | 11 | ||||
-rw-r--r-- | server/src/ui/admin/mod.rs | 7 | ||||
-rw-r--r-- | server/src/ui/admin/user.rs | 4 | ||||
-rw-r--r-- | server/src/ui/assets.rs | 4 | ||||
-rw-r--r-- | server/src/ui/home.rs | 3 | ||||
-rw-r--r-- | server/src/ui/items.rs | 4 | ||||
-rw-r--r-- | server/src/ui/node.rs | 4 | ||||
-rw-r--r-- | server/src/ui/player.rs | 4 | ||||
-rw-r--r-- | server/src/ui/search.rs | 3 | ||||
-rw-r--r-- | server/src/ui/stats.rs | 4 |
11 files changed, 21 insertions, 29 deletions
diff --git a/server/src/ui/account/mod.rs b/server/src/ui/account/mod.rs index a9c28ea..f3cd450 100644 --- a/server/src/ui/account/mod.rs +++ b/server/src/ui/account/mod.rs @@ -7,7 +7,6 @@ pub mod settings; use super::error::MyError; use crate::{ - database::Database, helper::A, locale::AcceptLanguage, ui::{error::MyResult, home::rocket_uri_macro_r_home}, @@ -18,6 +17,7 @@ use jellyimport::is_importing; use jellylogic::{ login::{hash_password, login_logic}, session::Session, + Database, }; use jellyui::{ account::{AccountLogin, AccountLogout, AccountRegister, AccountRegisterSuccess}, diff --git a/server/src/ui/account/settings.rs b/server/src/ui/account/settings.rs index 5355321..93f442c 100644 --- a/server/src/ui/account/settings.rs +++ b/server/src/ui/account/settings.rs @@ -4,11 +4,10 @@ Copyright (C) 2025 metamuffin <metamuffin.org> */ use super::{format_form_error, hash_password}; -use crate::{database::Database, helper::A, locale::AcceptLanguage, ui::error::MyResult}; -use jellybase::permission::PermissionSetExt; -use jellycommon::user::{PlayerKind, Theme, UserPermission}; +use crate::{helper::A, locale::AcceptLanguage, ui::error::MyResult}; +use jellycommon::user::{PlayerKind, Theme}; use jellyimport::is_importing; -use jellylogic::session::Session; +use jellylogic::{session::Session, Database}; use jellyui::{ account::settings::SettingsPage, locale::{tr, Language}, @@ -74,10 +73,6 @@ pub fn r_account_settings_post( ) -> MyResult<RawHtml<String>> { let AcceptLanguage(lang) = lang; let A(session) = session; - session - .user - .permissions - .assert(&UserPermission::ManageSelf)?; let form = match &form.value { Some(v) => v, diff --git a/server/src/ui/admin/mod.rs b/server/src/ui/admin/mod.rs index 62c5940..9bf85b5 100644 --- a/server/src/ui/admin/mod.rs +++ b/server/src/ui/admin/mod.rs @@ -10,12 +10,11 @@ use super::{ assets::{resolve_asset, AVIF_QUALITY, AVIF_SPEED}, error::MyResult, }; -use crate::{database::Database, helper::A, locale::AcceptLanguage}; +use crate::{helper::A, locale::AcceptLanguage}; use anyhow::{anyhow, Context}; -use jellybase::assetfed::AssetInner; use jellycommon::routes::u_admin_dashboard; -use jellyimport::{import_wrap, is_importing, IMPORT_ERRORS}; -use jellylogic::session::AdminSession; +use jellyimport::{asset_token::AssetInner, import_wrap, is_importing, IMPORT_ERRORS}; +use jellylogic::{session::AdminSession, Database}; use jellyui::{ admin::AdminDashboardPage, render_page, diff --git a/server/src/ui/admin/user.rs b/server/src/ui/admin/user.rs index fb646ab..eedf66c 100644 --- a/server/src/ui/admin/user.rs +++ b/server/src/ui/admin/user.rs @@ -3,11 +3,11 @@ which is licensed under the GNU Affero General Public License (version 3); see /COPYING. Copyright (C) 2025 metamuffin <metamuffin.org> */ -use crate::{database::Database, helper::A, locale::AcceptLanguage, ui::error::MyResult}; +use crate::{helper::A, locale::AcceptLanguage, ui::error::MyResult}; use anyhow::{anyhow, Context}; use jellycommon::user::UserPermission; use jellyimport::is_importing; -use jellylogic::{admin::user::admin_users, session::AdminSession}; +use jellylogic::{admin::user::admin_users, session::AdminSession, Database}; use jellyui::{ admin::user::{AdminUserPage, AdminUsersPage}, render_page, diff --git a/server/src/ui/assets.rs b/server/src/ui/assets.rs index 596661a..4e09417 100644 --- a/server/src/ui/assets.rs +++ b/server/src/ui/assets.rs @@ -6,9 +6,9 @@ use super::error::MyResult; use crate::{helper::{cache::CacheControlFile, A}, CONF}; use anyhow::{anyhow, bail, Context}; -use jellybase::{assetfed::AssetInner, database::Database}; use jellycommon::{LocalTrack, NodeID, PeopleGroup, SourceTrackKind, TrackSource}; -use jellylogic::session::Session; +use jellyimport::asset_token::AssetInner; +use jellylogic::{session::Session, Database}; use log::info; use rocket::{get, http::ContentType, response::Redirect, State}; use std::path::PathBuf; diff --git a/server/src/ui/home.rs b/server/src/ui/home.rs index 9c9c1ca..d323b11 100644 --- a/server/src/ui/home.rs +++ b/server/src/ui/home.rs @@ -6,10 +6,9 @@ use super::error::MyResult; use crate::{api::AcceptJson, helper::A, locale::AcceptLanguage}; -use jellybase::database::Database; use jellycommon::api::ApiHomeResponse; use jellyimport::is_importing; -use jellylogic::session::Session; +use jellylogic::{session::Session, Database}; use jellyui::{ home::HomePage, render_page, diff --git a/server/src/ui/items.rs b/server/src/ui/items.rs index e5aa050..31902f8 100644 --- a/server/src/ui/items.rs +++ b/server/src/ui/items.rs @@ -4,10 +4,10 @@ Copyright (C) 2025 metamuffin <metamuffin.org> */ use super::error::MyError; -use crate::{api::AcceptJson, database::Database, helper::A, locale::AcceptLanguage}; +use crate::{api::AcceptJson, helper::A, locale::AcceptLanguage}; use jellycommon::api::{ApiItemsResponse, NodeFilterSort}; use jellyimport::is_importing; -use jellylogic::{items::all_items, session::Session}; +use jellylogic::{items::all_items, session::Session, Database}; use jellyui::{ items::ItemsPage, render_page, diff --git a/server/src/ui/node.rs b/server/src/ui/node.rs index 1441cfc..eced16a 100644 --- a/server/src/ui/node.rs +++ b/server/src/ui/node.rs @@ -4,13 +4,13 @@ Copyright (C) 2025 metamuffin <metamuffin.org> */ use super::error::MyResult; -use crate::{api::AcceptJson, database::Database, helper::A, locale::AcceptLanguage}; +use crate::{api::AcceptJson, helper::A, locale::AcceptLanguage}; use jellycommon::{ api::{ApiNodeResponse, NodeFilterSort}, NodeID, }; use jellyimport::is_importing; -use jellylogic::{node::get_node, session::Session}; +use jellylogic::{node::get_node, session::Session, Database}; use jellyui::{ node_page::NodePage, render_page, diff --git a/server/src/ui/player.rs b/server/src/ui/player.rs index 300e9d2..614bf4a 100644 --- a/server/src/ui/player.rs +++ b/server/src/ui/player.rs @@ -4,7 +4,7 @@ Copyright (C) 2025 metamuffin <metamuffin.org> */ use super::error::MyResult; -use crate::{database::Database, helper::A, locale::AcceptLanguage, CONF}; +use crate::{helper::A, locale::AcceptLanguage, CONF}; use jellycommon::{ api::NodeFilterSort, stream::{StreamContainer, StreamSpec}, @@ -12,7 +12,7 @@ use jellycommon::{ NodeID, }; use jellyimport::is_importing; -use jellylogic::{node::get_node, session::Session}; +use jellylogic::{node::get_node, session::Session, Database}; use jellyui::{ node_page::NodePage, render_page, diff --git a/server/src/ui/search.rs b/server/src/ui/search.rs index 1c2ea70..92fcfce 100644 --- a/server/src/ui/search.rs +++ b/server/src/ui/search.rs @@ -6,10 +6,9 @@ use super::error::MyResult; use crate::{api::AcceptJson, helper::A, locale::AcceptLanguage}; use anyhow::anyhow; -use jellybase::database::Database; use jellycommon::api::ApiSearchResponse; use jellyimport::is_importing; -use jellylogic::{search::search, session::Session}; +use jellylogic::{search::search, session::Session, Database}; use jellyui::{ render_page, scaffold::{RenderInfo, SessionInfo}, diff --git a/server/src/ui/stats.rs b/server/src/ui/stats.rs index b6a74e5..d991fa0 100644 --- a/server/src/ui/stats.rs +++ b/server/src/ui/stats.rs @@ -4,10 +4,10 @@ Copyright (C) 2025 metamuffin <metamuffin.org> */ use super::error::MyError; -use crate::{api::AcceptJson, database::Database, helper::A, locale::AcceptLanguage}; +use crate::{api::AcceptJson, helper::A, locale::AcceptLanguage}; use jellycommon::api::ApiStatsResponse; use jellyimport::is_importing; -use jellylogic::{session::Session, stats::stats}; +use jellylogic::{session::Session, stats::stats, Database}; use jellyui::{ render_page, scaffold::{RenderInfo, SessionInfo}, |