feat: Implement file management and authorization features
Build and Deploy to Kubernetes / build-and-deploy (push) Failing after 3m9s
Build and Deploy to Kubernetes / build-and-deploy (push) Failing after 3m9s
- Add RequiresPermissionAttribute for gRPC method access control. - Create IFileManagementService interface for file upload and management. - Implement AddProductImageCommand and handler for adding product images. - Implement CreateNewProductsCommand and handler for creating new products with image uploads. - Implement DeleteProductsCommand and handler for deleting products and their associations. - Implement RemoveProductImageCommand and handler for removing product images from galleries. - Implement UpdateProductsCommand and handler for updating product details and images. - Create GetProductGalleryQuery and handler for retrieving product galleries. - Implement PermissionService for role-based access control using JWT claims. - Implement FileManagementService for handling file uploads and image optimization. - Define gRPC service and messages for file management in fms.proto. - Add FluentValidation for request validation in various commands. - Create PermissionInterceptor for enforcing permissions on gRPC methods.
This commit is contained in:
@@ -113,6 +113,7 @@ message CreateNewPackageRequest
|
||||
string description = 2;
|
||||
string image_path = 3;
|
||||
int64 price = 4;
|
||||
BoostCardFileModel image_file = 5;
|
||||
}
|
||||
message CreateNewPackageResponse
|
||||
{
|
||||
@@ -125,6 +126,7 @@ message UpdatePackageRequest
|
||||
string description = 3;
|
||||
string image_path = 4;
|
||||
int64 price = 5;
|
||||
BoostCardFileModel image_file = 6;
|
||||
}
|
||||
message DeletePackageRequest
|
||||
{
|
||||
@@ -412,3 +414,11 @@ enum PaymentStatusEnum
|
||||
PAYMENT_STATUS_FAILED = 2;
|
||||
PAYMENT_STATUS_REFUNDED = 3;
|
||||
}
|
||||
|
||||
// File upload model for binary image uploads from BackOffice
|
||||
message BoostCardFileModel
|
||||
{
|
||||
bytes file = 1;
|
||||
string file_name = 2;
|
||||
string mime = 3;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user