How to set conditional edit permissions on webforms? I need to extend a Drupal6 based system. I'm not too familiar with it since I overtook administration from another group. It has a product registration system wich uses webforms and a custom module. The user have to be able to edit the their own submitted webform but only until the status is set to accepted.

I switched on permissions for users to edit their content, and it works fine, but I need to revoke this permission based on a field in the webform. When the field value is set to "new" or "pending" the user must be able to edit the content, but when the business owner sets that field to "accepted", the user shouldn't be able to edit that submission any more.

How can I catch user permissions and only let users edit certain content when I want?
Just place a hook_form_alter() or a hook_form_FORM_ID_alter() (just for your webform) in your module.

Then inside the code check that the webform status is valid before committing the update or redirect to to an error page.