public boolean isTableAccessLevel(int AD_Table_ID,boolean ro){
  if (ro)   return true;
  loadTableInfo(false);
  String roleAccessLevel=(String)m_tableAccessLevel.get(new Integer(AD_Table_ID));
  if (roleAccessLevel == null) {
    log.fine("NO - No AccessLevel - AD_Table_ID=" + AD_Table_ID);
    return false;
  }
  if (roleAccessLevel.equals(X_AD_Table.ACCESSLEVEL_All))   return true;
  String userLevel=getUserLevel();
  if (userLevel.charAt(0) == 'S' && (roleAccessLevel.equals(X_AD_Table.ACCESSLEVEL_SystemOnly) || roleAccessLevel.equals(X_AD_Table.ACCESSLEVEL_SystemPlusClient)))   return true;
  if (userLevel.charAt(1) == 'C' && (roleAccessLevel.equals(X_AD_Table.ACCESSLEVEL_ClientOnly) || roleAccessLevel.equals(X_AD_Table.ACCESSLEVEL_SystemPlusClient)))   return true;
  if (userLevel.charAt(2) == 'O' && (roleAccessLevel.equals(X_AD_Table.ACCESSLEVEL_Organization) || roleAccessLevel.equals(X_AD_Table.ACCESSLEVEL_ClientPlusOrganization)))   return true;
  log.fine("NO - AD_Table_ID=" + AD_Table_ID + ", UserLevel="+ userLevel+ ", AccessLevel="+ roleAccessLevel);
  return false;
}

public boolean isTableAccessLevel ( int AD_Table_ID , boolean ro ) { if ( ro ) return true ; loadTableInfo ( false ) ; String roleAccessLevel = ( String ) m_tableAccessLevel . get ( new Integer ( AD_Table_ID ) ) ; if ( roleAccessLevel == null ) { log . fine ( "NO - No AccessLevel - AD_Table_ID=" + AD_Table_ID ) ; return false ; } if ( roleAccessLevel . equals ( X_AD_Table . ACCESSLEVEL_All ) ) return true ; String userLevel = getUserLevel ( ) ; if ( userLevel . charAt ( 0 ) == 'S' && ( roleAccessLevel . equals ( X_AD_Table . ACCESSLEVEL_SystemOnly ) || roleAccessLevel . equals ( X_AD_Table . ACCESSLEVEL_SystemPlusClient ) ) ) return true ; if ( userLevel . charAt ( 1 ) == 'C' && ( roleAccessLevel . equals ( X_AD_Table . ACCESSLEVEL_ClientOnly ) || roleAccessLevel . equals ( X_AD_Table . ACCESSLEVEL_SystemPlusClient ) ) ) return true ; if ( userLevel . charAt ( 2 ) == 'O' && ( roleAccessLevel . equals ( X_AD_Table . ACCESSLEVEL_Organization ) || roleAccessLevel . equals ( X_AD_Table . ACCESSLEVEL_ClientPlusOrganization ) ) ) return true ; log . fine ( "NO - AD_Table_ID=" + AD_Table_ID + ", UserLevel=" + userLevel + ", AccessLevel=" + roleAccessLevel ) ; return false ; }
access to table based on role user level table access level
