Author Topic: Permission error - Customplugins gone after product edit  (Read 477 times)

welrachid

  • Jr. Member
  • **
  • Posts: 233
  • 3rd party plugin developer
  • Skype Name: wel.rachid
  • VirtueMart Version: Always LATEST stable
Permission error - Customplugins gone after product edit
« on: June 21, 2018, 15:51:12 pm »
Hi guys
J!3.8.8
VM 3.2.14

Today we experienced that a products plugins disappear when saving from a sub-manager account.
We have a company doing the texts on products and they are set up with these access:

Access Administration Interface
VM Manager
Allow HTML Input ( so that they can do html in long description)
Product access
Product edit

We do however not want them to be able to change customplugins or media files or anything else.

its a custom usergroup we call seoguys placed under "manager"
public
- guest
- manager
| - admin
| - pricegroup (custom group that only gives access to products but no edits - so that they can get in a see pricing formular)
| - seoguys
- registered
| - author
| | - Editor
| | | - Publisher
- Super Users


Can any of you tell me if this is an error or not?
I can see that there ARE permissions called something with customfields, but i dont want them to be able to edit them.

Its ALL of the plugins that are removed from the product (we have 2 text, 1 custom price calculator and 1 fileuploader)

Thanks
- Wel
Best regards,
Wel

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9641
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Permission error - Customplugins gone after product edit
« Reply #1 on: June 24, 2018, 10:09:17 am »
Neither the function store in the product model, nor the function "storeProductCustomfields" is checking the any customfield related acl. I doubt that this is an ACL problem.

If it is an ACL problem, it should be possible to solve it, by giving the "right" permission. Then I can take a look and check why this perm makes trouble. But it should work as you configured it.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

welrachid

  • Jr. Member
  • **
  • Posts: 233
  • 3rd party plugin developer
  • Skype Name: wel.rachid
  • VirtueMart Version: Always LATEST stable
Re: Permission error - Customplugins gone after product edit
« Reply #2 on: June 25, 2018, 13:08:24 pm »
Hi Milbo.
I can confirm that there is an issue then. Look at this video:
https://www.youtube.com/watch?v=6_2D8leXMB4&feature=youtu.be&hd=1

Permissions can be seen here:
https://pasteboard.co/Hrw9c8p.png

Everything not on the permission image is not allowed (red)
Best regards,
Wel

welrachid

  • Jr. Member
  • **
  • Posts: 233
  • 3rd party plugin developer
  • Skype Name: wel.rachid
  • VirtueMart Version: Always LATEST stable
Re: Permission error - Customplugins gone after product edit
« Reply #3 on: July 02, 2018, 23:19:59 pm »
can someone else perhaps confirm this issue?
Best regards,
Wel

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9641
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Permission error - Customplugins gone after product edit
« Reply #4 on: July 23, 2018, 09:32:26 am »
I just can say that we use on extensions.virtuemart.net also this system and our vendors can store products with customfields. But I allow them also access to "customfields" view. Please give them as test the right to access the customfield list.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

welrachid

  • Jr. Member
  • **
  • Posts: 233
  • 3rd party plugin developer
  • Skype Name: wel.rachid
  • VirtueMart Version: Always LATEST stable
Re: Permission error - Customplugins gone after product edit
« Reply #5 on: August 07, 2018, 12:55:13 pm »
Hi sorry for the late response. i just tested with customfield access
This still gives error
It creates new customfield-entries in db with new id's to the customfields and completely removes the old.

It says it has issues with media when saving. see attachemnt

Best regards,
Wel

welrachid

  • Jr. Member
  • **
  • Posts: 233
  • 3rd party plugin developer
  • Skype Name: wel.rachid
  • VirtueMart Version: Always LATEST stable
Re: Permission error - Customplugins gone after product edit
« Reply #6 on: August 07, 2018, 13:08:42 pm »
okay
i tried something wild now..
i gave access to ALL VM permissions
Then i was able to save without any problems
Then after i removed ALLE permissions again (inherit)
only allowing the following:
Access Administration Interface
VM Manager
Allow raw input
Allow HTML Input
Product access
Product edit


Note i did not give access to customfields. but now it saves correctly?! WTF?
Best regards,
Wel

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 3331
  • Joomla & Virtuemart addon developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3.0.x.y
Re: Permission error - Customplugins gone after product edit
« Reply #7 on: August 07, 2018, 18:42:12 pm »
welrachid : 3rd party plugin developer ?
Can you not do a debug to check ? more you send info, more you get answer and possible fix.

welrachid

  • Jr. Member
  • **
  • Posts: 233
  • 3rd party plugin developer
  • Skype Name: wel.rachid
  • VirtueMart Version: Always LATEST stable
Re: Permission error - Customplugins gone after product edit
« Reply #8 on: August 08, 2018, 00:25:21 am »
I would actually like to, and i try to when i have an idea - but i have no idea how permissions-stuff work in joomla/VM - never touched it with any of my plugins
I would think i need to look somewhere around a product controller.....
Best regards,
Wel