-
Notifications
You must be signed in to change notification settings - Fork 0
Feat/app review route and valiadation #106
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
Conversation
- Update core dependency to latest version - Change git ref from 4ffe883 to a960fe8
Introduces a new set of permissions for the `AppReview` resource. This follows the established `resource.action_owned` pattern for user-generated content, defining `create`, `read`, and `update` permissions. These will be used to control user access to their own app review records.
Assigns the newly created `app_review.*_owned` permissions to all standard app user roles (`guestUser`, `standardUser`, `premiumUser`). This allows any authenticated user to create and manage their own app review feedback through the generic data API.
Adds a `ModelConfig` for the new `AppReview` model to the central model registry. This configuration defines it as a user-owned resource, mapping the `create`, `read`, and `update` actions to their corresponding `app_review.*_owned` permissions and enabling ownership checks. This makes the `AppReview` model accessible via the generic `/data` endpoint.
Initializes a `DataMongodb<AppReview>` client and its corresponding `DataRepository<AppReview>`. This repository is then added to the `AppDependencies` provider, making it available for use by other services, such as the `UserActionLimitService`.
Adds the newly created `DataRepository<AppReview>` to the root middleware's provider chain. This makes the repository accessible from the request context, allowing the generic data route handlers to perform CRUD operations on the `app_reviews` collection.
- Register read and readAll operations for AppReview - Implement custom create operation with security check for AppReview - Add update and delete operations for AppReview
- Add index on 'userId' field in app_reviews collection - Optimize fetching review record for a specific user - Ensure indexes for app_reviews collection are set up correctly
Summary of ChangesHello @fulleni, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request delivers a new 'app review' feature, allowing users to submit and manage their application feedback. The implementation includes a new Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Code Review
This pull request introduces a new feature for handling app reviews, including the necessary API routes and validation. The changes are well-structured, adding the AppReview model, its repository, permissions, and registering it for data operations. The refactoring of model_registry.dart also helps organize the code.
My main feedback is regarding the creation of app reviews. The custom creator for app_review is missing a rate-limiting check, which is present for other user-generated content like engagements and reports. Adding this check would be crucial to prevent potential abuse. I've also left a minor suggestion to improve type safety for consistency.
- Remove unused UserActionLimitService injection in app_review creator
Status
READY
Description
This pull request delivers a new 'app review' feature, allowing users to submit and manage their application feedback. The implementation includes a new AppReview data model, its integration into the application's data access and authorization framework, and the establishment of appropriate permissions for user interaction. A refactoring of the data model registration system was also undertaken to support this new model and streamline future additions.
Type of Change