[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] Attempted database update without permission - using [table-editor]
Hi guys;
I tried to use [table-editor] tag to edit data in userdb.
This is what my page looks like:
[calc]
if($CGI->{customer}) {
$CGI->{item_id} = $CGI->{customer};
}
if(! $CGI->{item_id} and $Session->{arg}) {
$CGI->{item_id} = $CGI->{customer} = $Session->{arg};
}
$CGI->{customer} = $CGI->{item_id} if ! $CGI->{customer};
return if ! $CGI->{item_id};
if(! $CGI->{mv_data_table}) {
$CGI->{ui_hide_key} = 1;
$CGI->{mv_data_table} = 'userdb';
$CGI->{auto_secure} = 1;
}
if(! $CGI->{ui_data_fields}) {
$CGI->{ui_data_fields} = 'username company fname lname mv_shipmode
price_level email_copy mail_list email phone_day phone_night fax ';
}
if(! $CGI->{mv_blob_field}) {
$CGI->{mv_blob_title} = '<B>Profiles</B>';
$CGI->{mv_blob_field} = 'preferences';
$CGI->{mv_blob_label} = 'nothing';
$CGI->{mv_blob_pointer} = 'p_nickname';
}
if(! $CGI->{ui_break_before}) {
$CGI->{ui_break_before} = 'dealer email_copy email db_acl';
$CGI->{ui_break_before_label} = 'email_copy=Email preferences,
email=Contact info';
}
if(! $CGI->{ui_return_to}) {
$CGI->{ui_return_to} = join "\0",
'customer_view',
"customer=$CGI->{item_id}",
;
}
return;
[/calc]
[update values]
[if !cgi item_id]
[bounce page="ya_customers_report"]
[/if]
[seti page_banner]Customer preferences: <B>[page href="customer_view"
form="customer=[cgi customer]"][cgi customer]</A></B>[/seti]
<P>
<font size="3" color="#134582"><b>Edit Customer
Details</b></font><br><br>
[scratch page_banner]
[table-editor cgi=1]
What ever I tried to do I am getting following in error log:
Attempted database update without permission, table=userdb key="whatever
key is for record that I am trying to edit."
I tried adding following on the top of the page:
[set mv_data_enable]1[/set]
[tag flag write]userdb/tag]
But that didn't help much.
I am not sure what is going on with thsi, because I can save data to
userdb once when I am inputing them using form.
Please help.
Thanks
Alma