[ic] need help with acl for soft goods purchasing

Mark Stosberg mark@summersault.com
Wed, 14 Mar 2001 11:35:16 -0500


Hello!

    I'm working on getting soft goods downloading working with Minivend
4.04a and have progressed a bit. I believe I'm currently getting stuck
with a problem related to the "ACL" permissions of the file. I'm getting
back the error:
"Sorry, not authorized for PDF1. Buy it first, please."

Any help in this area would be appreciated.  The pertinent details are
below. 

 On the receipt page, I have code that trys to have the logic of:

" for each downloadable file, set it's expiration date to 7 days, and
return a return a link
	to where it can be downloaded" 

[set download_present][/set]
[item-list]
	[if-item-field dl_location]
			[set download_present]1[/set]
			[userdb
					function=set_file_acl
					mode="expire 7 days"
					location="[item-code]"
			]
      	[calc] my $save = delete $Scratch->{mv_add_dot_html}; [/calc]
		<BR><A HREF=[area href="deliver/[item-field dl_location]"
arg=[item-field code]]download</A>
		[calc] $Scratch->{mv_add_dot_html} = $save if $save;[/calc]	
[/if-item-field]

######################################

I'm keeping the files in the pages/deliver directory
and I'm using the standard "deliver.html" page delivered with Minivend.
In Catalog.cfg, I have these related Variables:

# Add some variables that might help with Soft Goods downloading 
Variable   MV_USERDB_ACL_TABLE  userdb
Variable   MV_USERDB_ACL_COLUMN acl

The "acl" column did not appear in the userdb.txt file, so I added it.

This also appears to use the "deliver" ActionMap, which was already
defined in Catalog.cfg.

I tried creating a zero byte ".access" file in the deliver directory,
but I got a different error: "You must be logged in to view this page".
Although I expect the user to have a session, our scheme doesn't require
them to be logged in. 

Thanks!

   -mark

personal website             }      Summersault Website Development
http://mark.stosberg.com/    {      http://www.summersault.com/