Permission on action

10 views
Skip to first unread message

giorgio.s...@gmail.com

unread,
Nov 8, 2021, 10:27:17 AM11/8/21
to Xataface
I have create this rest api called by as an action:

class actions_myGeoJsonPG {

function handle($params){
        $app = Dataface_Application::getInstance();
$auth =& Dataface_AuthenticationTool::getInstance();
        $query = $app->getQuery();

        $user =& $auth->getLoggedInUser();
        if ( !$user ) 
die("no access");
        session_write_close();
        header('Connection:close');
        .....
        ......

I put permission control inside of handler, is good or there is a better way to do this?
Is possible to using class conf_ApplicationDelegate for check permission on action?


Reply all
Reply to author
Forward
0 new messages