Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

extracts versions #789

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open

extracts versions #789

wants to merge 11 commits into from

Conversation

thesuzerain
Copy link
Contributor

@thesuzerain thesuzerain commented Dec 7, 2023

Fixes MOD-550

In addition, fixed a bug or two I found with the filter_authorized_versions method (and similar), and restructured and renamed them to avoid it

@thesuzerain thesuzerain marked this pull request as ready for review December 18, 2023 16:50
// Filters out projects for which we are a member of the team (or a mod)
// These are projects we have internal access to and can potentially see even if they are hidden
// This is useful for getting visibility of versions, or seeing analytics or sensitive team-restricted data of a project
pub async fn filter_enlisted_projects_ids(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

weird func name here "enlisted_project_ids"

Ok(return_versions)
}

pub async fn filter_enlisted_version_ids(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here, enlisted is a weird term for this, what does it even do?

@@ -959,7 +1070,7 @@ pub struct QueryProject {
pub inner: Project,
pub categories: Vec<String>,
pub additional_categories: Vec<String>,
pub versions: Vec<VersionId>,
pub public_versions: Vec<VersionId>,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why still have this attr on query project? isn't the point of this PR to remove it?

pub fn config(cfg: &mut web::ServiceConfig) {
cfg.route("search", web::get().to(project_search));
cfg.route("projects", web::get().to(projects_get));
cfg.route("projects", web::patch().to(projects_edit));
cfg.route("projects_versions", web::get().to(projects_version_list));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this route registered twice?

@@ -2279,3 +2301,88 @@ pub async fn project_unfollow(
))
}
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

commented code

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants