I don't think that this module currently respects either content type access permissions for products embedded into webforms, or the published/unpublished settings for a node. That should be fixed.

CommentFileSizeAuthor
#5 uc_webform-pubunpub-D6-1358390-5.patch2.76 KBrakun

Comments

mgifford’s picture

Priority: Normal » Major

Sounds like a potential security issue.

retorque’s picture

I'm currently depending on the fact that neither this module nor node_checkout respect the published/unpublished status of Ubercart product nodes when adding them to the cart. I'm sure I can find a workaround if that changes, though.

ldweeks’s picture

Yeah, I've been slow to change this because I think that many implementations are depending on the way it works now (even though I grant that it's probably wrong).

goose2000’s picture

I don't mean to hi-jack this issue. But I am trying to to edit the webform product list component, to only show the products that are set to "Published." It is very hard to find my needed events in this forest of products. So I am looking at product_list.inc .

I am looking at the lines 70-71 and am going to edit the query:

// Limit selection to only those products that do *not* contain attributes.
  $result = db_query(db_rewrite_sql("SELECT n.nid, n.title, p.model FROM {node} AS n INNER JOIN {uc_products} AS p ON n.nid = p.nid WHERE n.nid NOT IN (SELECT nid FROM {uc_product_attributes}) ORDER BY n.title"));

So that it will only pick up those nodes that are also set to published, clean up my list. Just thought I'd share my idea.

Update, seems to be working nice, simply added 'status' and an 'AND' condition:

// Limit selection to only those products that do *not* contain attributes.
// And only product nodes that are published.
  $result = db_query(db_rewrite_sql("SELECT n.nid, n.status, n.title, p.model FROM {node} AS n INNER JOIN {uc_products} AS p ON n.nid = p.nid WHERE n.nid NOT IN (SELECT nid FROM {uc_product_attributes}) AND n.status = 1 ORDER BY n.title"));
rakun’s picture

Version: 6.x-1.3 » 7.x-2.x-dev
Issue summary: View changes
StatusFileSize
new2.76 KB

Submited patch handles publish/unpublish nodes on uc_webform components configuration page. Node access permissions will not be supported for D6.

rakun’s picture

Version: 7.x-2.x-dev » 6.x-1.x-dev
deja711’s picture

Version: 6.x-1.x-dev » 6.x-1.9
Status: Active » Closed (fixed)

Publish/unpublish is now supported in version 6.x-1.9.
Node access permissions will not be supported for D6. Perhaps in D7?