Hello dear people,
I've recently been working on cscart, developing an addon. Now, I'm setting vendor permissions as follows:
File: addons dir/myaddon/schemas/permissions/vendor.post.php
$schema['import']['permissions'] = 0;
$schema['import']['sections']['orders']['permission']= 1;
$schema['import']['sections']['products']['permission'] = 0;
$schema['import']['sections']['product']['permission'] = 0;
$schema['import']['sections']['users']['permission'] = 0;
$schema['import']['sections']['translations']['permission']= 0;
This works out well, until I clear the cache by setting the &cc
parameter in the URL, to clear the cache.
However, when I clear my cache the permissions seem to be reset to the defaults.
So let's say I just logged in as a vendor, I navigate to “http://www.example.com/vendor.php?dispatch=exim.import”. This results in an “Access denied” warning, as expected, and i am allowed to visit the “http://www.example.com/vendor.php?dispatch=exim.import§ions=orders” as desired.
Now I'll reset my cache (“http://www.example.com/vendor.php?cc”).
Now all my permission settings seem to be reset to default values and my previously set access restrictions seem ignored.
I'm expecting that I'm missing something somewhere, or that I'm going about this entirely wrong.
Is this desired behaviour, if so, how would I go about and “fix” this within an addon?
Any suggestions are welcome, thanks in advance!
EDIT Just noticed that I Should have placed this in a different subforum