Permission guard simplification

This commit is contained in:
2024-08-05 23:45:00 +03:00
parent 9f76228ebe
commit eba30d1e9d
14 changed files with 42 additions and 24 deletions

View File

@ -13,7 +13,6 @@ pub async fn create(
) -> GeneralResult<Json<Uuid>> {
db::folder::get_permissions(params.parent_folder_id, claims.user_id, &pool)
.await
.map_err(GeneralError::permissions)?
.can_write_guard()?;
let exists = db::folder::name_exists(params.parent_folder_id, &params.folder_name, &pool)