News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Error with permissions in frontend

Started by jorgepracticum, November 10, 2015, 12:35:02 PM

Previous topic - Next topic

jorgepracticum

Hi
I have some issues with permissions in the component, so I have looked for the problem in your source code. I think that I found a problem with the code. In the file administrator/components/com_virtuemart/helpers/config.php, inside the method "manager", in line 1275 there is a foreach loop. Inside this loop, it asks for permissions and concatenate strings. The problem that I have found is that one of the final string that become is "vm.vm.product.edit". I have looked for that permission in my database and I haven't found it. So this can be a codification error
I am using VirtueMart 3 and Joomla 3
Regards
J.

Milbo

Great that you noticed it. Found and fixed. Update will come soon.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

jorgepracticum

Your are welcome ;)
Another thing that I have seen is that another permission that the program ask is "vm.core". This is another permission that I don't see in the database. Can you check if this is another error?
Regards

Milbo

ehrm, where? Damn that would be a bit sad, we just released
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

jorgepracticum

I haven't updated yet
I've detected the error in the same loop

Milbo

"vm.core" is attended taht you dont find it. is "core" which is never found and means admins only
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

jorgepracticum


jorgepracticum

I don't understand why if I want to let a user edit to product, the user must has vm.managevendors permission
If the user doesn't have that permission, the icon to edit de products doesn't appear in the product details view
I don't understand why the user needs that permission when exista another permission to edit products: vm.product.edit
Is this an error or not?
Regards

Milbo

Because you have a broken setup.

Imagine you can use VM like ebay. So a normal vendor MUST NOT be allowed to edit items of another vendor. If you want to edit the items of another vendor you must be Superadmin or have the right to switch the vendor.

in a normal Singlevendor store it should not be necessary to set this permission.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

jorgepracticum