I see many many questions on how to set permission levels through the admin interface, but I don't see much on how to write the code that governs the permissions.
I have used the Template permission schema to write a permission for the module I am writing.
Code
if(!pnSecAuthAction(0, 'pnHop::', '::', ACCESS_ADD))
{
pnSessionSetVar('errormsg', _PNHOPNOAUTH);
pnRedirect(pnModURL('pnHop','user','main'));
return true;
}
{
pnSessionSetVar('errormsg', _PNHOPNOAUTH);
pnRedirect(pnModURL('pnHop','user','main'));
return true;
}
The permissions setting on the permissions page is this
Quote
Teachers | pnHop:: | :: | Delete
Now, this works fine on my server here at home but when I upload the files to the real server, I get the error message instead of carrying out the action I want.
I have checked to see that all groups and users are the same in both places (dumped the tables from one DB to the other).
I have double checked the permission settings on both servers to make sure they are the same.
Is there any other possible reason why the permissions work at home and not on the real site? Could there be a PHP setting different at my ISP than what I have at home?
PHP 4.3.0 at home and at ISP
Thanks in advance for your help. School is starting and I really need to get this working in production.
