Closed david-loe closed 2 months ago
The pull request introduces significant changes across multiple components, primarily focusing on enhancing project selection functionality and user access control. The getProject
method in the backend has been restructured to allow access based on specific user permissions. Additionally, a new ProjectSelector
component has been added to various frontend forms, enabling users to select projects more intuitively while adjusting organization settings dynamically.
Files | Change Summary |
---|---|
backend/controller/projectController.ts |
The getProject method logic was inverted to allow access based on specific user permissions. If conditions are met, project data is retrieved; otherwise, an AuthorizationError is thrown. The return statement after the authorization check was removed. |
frontend/src/components/elements/PaginationList.vue |
A new ProjectSelector component was added to allow project selection as a search filter. The data function now includes a project property, and the components declaration includes ProjectSelector . |
frontend/src/components/elements/ProjectSelector.vue |
Modifications were made to organization selection and project retrieval. A new org variable was added, and the logic for updating user settings was simplified. The getProjects method now directly checks project visibility based on the selected organization. |
frontend/src/components/expenseReport/forms/ExpenseReportForm.vue |
The ProjectSelector component was updated to include a new prop, :update-user-org , conditionally set based on the askOwner variable. |
frontend/src/components/healthCareCost/forms/HealthCareCostForm.vue |
The ProjectSelector component was modified to include a new prop, :update-user-org , based on the negation of the askOwner variable. |
frontend/src/components/travel/forms/TravelApplyForm.vue |
The ProjectSelector component was updated to include a new prop, :update-user-org , conditionally set based on the askOwner variable. Minor formatting changes were also made. |
sequenceDiagram
participant User
participant Frontend
participant Backend
User->>Frontend: Select project
Frontend->>Backend: Request project data
Backend->>Backend: Check user permissions
alt User has access
Backend->>Frontend: Return project data
else User does not have access
Backend->>Frontend: Throw AuthorizationError
end
🐇 In the meadow where projects bloom,
A selector hops to clear the gloom.
With choices bright, and access fair,
Users leap with joy, without a care.
So let us cheer, with fluffy delight,
For changes made, all feels just right! 🌼✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Fixes #95
Summary by CodeRabbit
Release Notes
New Features
ProjectSelector
component for enhanced project selection in various forms.Bug Fixes
ProjectSelector
.Enhancements
ProjectSelector
component.ExpenseReportForm
,HealthCareCostForm
, andTravelApplyForm
to utilize the newupdate-user-org
prop for better user organization handling.