private int AuthCheck(AuthorizerAC code, string arg1, string arg2, string arg3) { //// Don't do any authorization checks if the database is initialising or if the parser is being invoked from within sqlite3_declare_vtab. //if (db->init.busy || IN_DECLARE_VTAB) // return (int)RC.OK; // if (_db.Authorizer == null) return (int)RC.OK; var rc = _db.Authorizer(_db.AuthorizerArg, code, arg1, arg2, arg3, _authContext); if (rc == (int)AuthorizerRC.DENY) { ErrorMsg("not authorized"); _rc = (int)RC.AUTH; } else if (rc != (int)RC.OK && rc != (int)AuthorizerRC.IGNORE) { rc = (int)AuthorizerRC.DENY; AuthBadReturnCode(); } return rc; }
private int AuthCheck(AuthorizerAC code, string arg1, string arg2, string arg3) { //// Don't do any authorization checks if the database is initialising or if the parser is being invoked from within sqlite3_declare_vtab. //if (db->init.busy || IN_DECLARE_VTAB) // return (int)RC.OK; // if (_db.Authorizer == null) { return((int)RC.OK); } var rc = _db.Authorizer(_db.AuthorizerArg, code, arg1, arg2, arg3, _authContext); if (rc == (int)AuthorizerRC.DENY) { ErrorMsg("not authorized"); _rc = (int)RC.AUTH; } else if (rc != (int)RC.OK && rc != (int)AuthorizerRC.IGNORE) { rc = (int)AuthorizerRC.DENY; AuthBadReturnCode(); } return(rc); }