Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ratings CRUD #516

Merged
merged 15 commits into from
Nov 12, 2024
Merged

Ratings CRUD #516

merged 15 commits into from
Nov 12, 2024

Conversation

fritzrehde
Copy link

No description provided.

@fritzrehde fritzrehde mentioned this pull request Sep 30, 2024
@KavikaPalletenne KavikaPalletenne linked an issue Sep 30, 2024 that may be closed by this pull request
backend/server/src/models/ratings.rs Show resolved Hide resolved
backend/server/src/models/ratings.rs Outdated Show resolved Hide resolved
backend/server/src/models/ratings.rs Outdated Show resolved Hide resolved
backend/server/src/handler/ratings.rs Outdated Show resolved Hide resolved
backend/server/src/main.rs Outdated Show resolved Hide resolved
backend/server/src/models/ratings.rs Outdated Show resolved Hide resolved
backend/server/src/models/ratings.rs Outdated Show resolved Hide resolved
backend/server/src/models/ratings.rs Outdated Show resolved Hide resolved
backend/server/src/service/ratings.rs Show resolved Hide resolved
backend/server/src/service/ratings.rs Outdated Show resolved Hide resolved
@fritzrehde
Copy link
Author

Write API docs in yaml file.

FROM organisation_members om
JOIN campaigns c ON om.organisation_id = c.organisation_id
JOIN applications a ON a.campaign_id = c.id
JOIN application_ratings ar ON a.campaign_id = c.id
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
JOIN application_ratings ar ON a.campaign_id = c.id

/// Any member of the organisation that owns the campaign is an application
/// viewer, because all members are either directors or execs (TODO: might be
/// changed in the future).
pub async fn assert_user_is_application_reviewer_admin_given_application_id(
Copy link
Contributor

Choose a reason for hiding this comment

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

This whole thing might not be needed yet because if a person is an organisation member, they are also an application reviewer, so this authZ check should be covered by the function assert_user_is_organisation_member below

Copy link
Contributor

Choose a reason for hiding this comment

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

But we can keep it, and update the internal logic later once we add Organisation roles

@fritzrehde fritzrehde marked this pull request as ready for review November 12, 2024 04:13
Copy link

@AlexMIaoPU AlexMIaoPU left a comment

Choose a reason for hiding this comment

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

yoooo

@KavikaPalletenne KavikaPalletenne merged commit 47aef32 into CHAOS-224-KHAOS-rewrite Nov 12, 2024
4 checks passed
@KavikaPalletenne KavikaPalletenne deleted the CHAOS-ratings-crud branch November 12, 2024 07:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ratings CRUD
3 participants