cont3xt/view.js
/**
   * Verify the view, returns error msg on failure
   */
Verify the view, returns error msg on failure
Verify the view returns error msg on failure
static verifyView (view) {
    if (typeof (view.name) !== 'string') {
      return 'Missing name';
    }
    if (view.viewRoles !== undefined && !Array.isArray(view.viewRoles)) {
      return 'viewRoles must be array';
    }
    if (view.editRoles !== undefined && !Array.isArray(view.editRoles)) {
      return 'viewRoles must be array';
    }
    if (view.integrations !== undefined && !Array.isArray(view.integrations)) {
      return 'integrations must be array';
    }
    return null;
  }
static verifyView ( view ) { if ( typeof ( view . name ) !== 'string' ) { return 'Missing name' ; } if ( view . viewRoles !== undefined && ! Array . isArray ( view . viewRoles ) ) { return 'viewRoles must be array' ; } if ( view . editRoles !== undefined && ! Array . isArray ( view . editRoles ) ) { return 'viewRoles must be array' ; } if ( view . integrations !== undefined && ! Array . isArray ( view . integrations ) ) { return 'integrations must be array' ; } return null ; }
Verify the view, returns error msg on failure
Verify the view returns error msg on failure
// TODO: Check roles