Check another page permissions

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
muttou
User
Posts: 124

Check another page permissions

Post by muttou »

I have a scenario lets say, i have 02 Tables A, B. currently i am on page A and required page B events like can edit? can add? can del? on page A. how can i access this in JS/sever events.

preferably i want to see this kind of syntax
Page(B) -> Security() -> canEdit() in server events
ew.Page.B.canEdit() in js

hope things are clear and understandable. thank you for your prompt and positive response.


arbei
User
Posts: 9286

Post by arbei »

On server side, you may try, e.g.

$security = new AdvancedSecurity();
$security->loadTablePermissions("TableB");
$canEdit = $security->canEdit();
...

To pass to client side, you may use SetClientVar(), see Some Global Functions.


muttou
User
Posts: 124

Post by muttou »

thank you vary much.. got an idea. hope will work


Post Reply