VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: jorgepracticum on November 10, 2015, 12:35:02 PM

Title: Error with permissions in frontend
Post by: jorgepracticum on November 10, 2015, 12:35:02 PM
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.
Title: Re: Error with permissions in frontend
Post by: Milbo on November 10, 2015, 13:51:22 PM
Great that you noticed it. Found and fixed. Update will come soon.
Title: Re: Error with permissions in frontend
Post by: jorgepracticum on November 11, 2015, 10:17:12 AM
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
Title: Re: Error with permissions in frontend
Post by: Milbo on November 11, 2015, 18:56:48 PM
ehrm, where? Damn that would be a bit sad, we just released
Title: Re: Error with permissions in frontend
Post by: jorgepracticum on November 12, 2015, 10:22:01 AM
I haven't updated yet
I've detected the error in the same loop
Title: Re: Error with permissions in frontend
Post by: Milbo on November 12, 2015, 19:16:34 PM
"vm.core" is attended taht you dont find it. is "core" which is never found and means admins only
Title: Re: Error with permissions in frontend
Post by: jorgepracticum on November 13, 2015, 11:09:20 AM
Ok
Thank you
Title: Re: Error with permissions in frontend
Post by: jorgepracticum on November 16, 2015, 10:21:42 AM
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
Title: Re: Error with permissions in frontend
Post by: Milbo on November 16, 2015, 10:25:27 AM
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.
Title: Re: Error with permissions in frontend
Post by: jorgepracticum on November 16, 2015, 10:28:22 AM
Ok
Thanks
Now I understand it perfectly ;)