When I add a file in file dowloand feature, it gives me an error, "An HTTP error 403 occured." See attachment for watchdog error.
| Preview | Attachment | Size |
|---|---|---|
![]() | problem in adding file download features.JPG | 25.35 KB |
|
Ubercart |
|
|
|
||
|
Fri, 10/03/2008 - 05:47
When I add a file in file dowloand feature, it gives me an error, "An HTTP error 403 occured." See attachment for watchdog error.
Re: An HTTP error 403 occured when adding file in file download
It seems the autocomplete field for the filename needs the user to have the "administer products" permission to function, even though adding the entire feature just needs "administer product features". I'm pretty sure that uc_file was written before the product feature permission existed, so it probably just didn't get updated. I'll get that fixed for UC 1.5.
Re: Re: An HTTP error 403 occured when adding file in file downl
I enabled already the "administer product features" for authenticated user to used this feature. But the problem is "An HTTP error 403 occurred." Now, the issue here if this problem would be fixed, the authenticated user can have an access all the files stored in the directory. Is this possible that authenticated user can only access their own files? Thanks.
Re: Re: Re: An HTTP error 403 occured when adding file in file d
Now I'm really confused. Why do you want any user to be able to upload files for other people to buy and download? It should be that only the store administrator should add product features. The "administer product features" permission isn't necessary to allow people to download the files that they bought. Also, you need the "administer products" permission to see the list of files on the server. That's a mistake, but that's how it works right now. And you certainly don't want to give that permission to all authenticated users.
This is the scenario:
A site
This is the scenario: A site admin will only get a certain percentage of the product price from the seller's product, a seller who is the authenticated user can create a product and upload file for his/her products to sell. So that is why, I am looking for a solution that the seller will have a rights to used the file download feature in Ubercart inorder for him/her assigned to his product. Thanks.
Re: This is the scenario:
A site
Re: Re: This is the scenario: A site
I used already the ubercart_marketplace module. But my problem right now, I have to give rights to the seller that he/she can assigned the file in file download feature in ubercart, and he/she only can view his own file/s.
Re: Re: Re: This is the scenario: A site
Oh, well if that's what you are using, then you should create an issue for that module - since that is what's handling those features. Right now I'm pretty sure that functionality doesn't exist in marketplace. But it'd be pretty easy to do. Just to clarify you're saying the user can only view the files they have added to the product? Or only the files they have uploaded before they can add them? Or both?
Seller A created a product
Seller A created a product and uploaded his file. Seller B created a product and uploaded his file. Where Seller A can add his own uploaded file in the download file feature without accessing the file of Seller B. And the same with Seller B. Because right now, Ubercart gives an access to all files, not an individual file. There should be privacy.
Re: Seller A created a product
Right, I agree, and where is it that the users are able to access each other's files? You should have turned off "Administer Product Features" (if that permission is available yet - I'm not sure). Sellers should not be able to visit the Features tab, where the autocomplete field lives for adding files to products. With Marketplace, the only way to add products is through your product Edit form (using the File Upload form and then checking the box to commit as a file feature). One feature that I know is coming, from Turgrid (who created the Marketplace module) is the ability to store users' files in their own subdirectory of the File Downloads location. This is something I've already done for my custom module, and hopefully Turgrid will be able to integrate some of that into his system. It would also mean a custom autocomplete within your product's Edit form, which only returns a list of files in your subdirectory.. It's definitely possible but I'm afraid the functionality doesn't exist yet. If you can wait a little while I think we'll be able to come up with something, maybe even a simple solution that I can offer as a patch to Marketplace.
Re: Re: Seller A created a product
torgosPizza is correct. "Administer Product Features" permission should be disabled and a FileField (using mp_file and CCK FileField) should be set up for product edit form. On a side note, I have seen the 403 error caused when an incorrect file mask is entered at admin/store/settings/products/edit/features. The default of .* should be entered. A more complete solution will be coming in the future, but what is available is working. Thanks again torgosPizza for your offer/contribution in this area...let me know when you get a chance, as I would love to see what you have done.
Re: Re: Re: Seller A created a product
Actually, I am also using the "Administer Product Features" because of this module (http://www.ubercart.org/contrib/2433) where seller can use this feature. I don't know if this is possible that the alternative price can be added in the product form, without going to "Administer Product Features". Let me know if you tried this one. Thank you so much.. |
|