-
Notifications
You must be signed in to change notification settings - Fork 76
extracts versions #789
base: master
Are you sure you want to change the base?
extracts versions #789
Conversation
… extracts-versions
// 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( |
There was a problem hiding this comment.
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( |
There was a problem hiding this comment.
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>, |
There was a problem hiding this comment.
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)); |
There was a problem hiding this comment.
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( | |||
)) | |||
} | |||
} | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
commented code
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