Page 1 of 1

Check another page permissions

Posted: Sat Jul 30, 2022 9:58 pm
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.


Re: Check another page permissions

Posted: Sat Jul 30, 2022 11:02 pm
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.


Re: Check another page permissions

Posted: Sat Jul 30, 2022 11:57 pm
by muttou

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