anchor.diff:          ?assertEqual(true, lists:member({imem,user_table_123}, UserTables)),
           % ?LogDebug("success ~p~n", [user_tables]),
   
  -        % LogCount1 = table_size(SeCoAdmin,?LOG_TABLE),
  -        % ?assertEqual(ok, log_to_db(SeCoAdmin,info,?MODULE,test,[{test_1,value2},{test_3,value4}],"Message")),        
  -        % LogCount2 = table_size(SeCoAdmin,?LOG_TABLE),
  -        % ?assertEqual(LogCount1+1,LogCount2),
  -        % ?assertException(throw, {SeEx,{"Insert into ddLog@ unauthorized",SeCoUser}}, log_to_db(SeCoUser,info,?MODULE,test,[{test_5,value6},{test_7,value8}],"Message")),        
  -        % LogCount3 = table_size(SeCoAdmin,?LOG_TABLE),
  -        % ?assertEqual(LogCount2+1,LogCount3),
  -
  -
           LogTable = physical_table_name(SeCoAdmin,?LOG_TABLE),
           % ?LogDebug("success ~p ~p~n", [physical_table_name,LogTable]),
           ?assertException(throw, {SeEx,{"Select unauthorized",{_,SeCoUser}}}, physical_table_name(SeCoUser,?LOG_TABLE)),    
  
positive.code:         , have_permission/2    
          ]).
  
  % exported for test
  -export([ select_rowfun_str/5
          ]).
  
  %% one to one from dd_account ------------ AA FUNCTIONS _--------
  
  authenticate(_SKey, SessionId, Name, Credentials) ->
  
negative.code: 
  %% from imem_meta --- HELPER FUNCTIONS do not export!! --------
  
  if_is_system_table(SKey,{_,Table}) -> 
      if_is_system_table(SKey,Table);       % TODO: May depend on Schema
  if_is_system_table(_SKey,Table) when is_atom(Table) ->
      case lists:member(Table,?SECO_TABLES) of
          true ->     true;
          false ->    imem_meta:is_system_table(Table)
      end;
  if_is_system_table(SKey,Table) when is_binary(Table) ->
      try
          {S,T} = imem_sql_expr:binstr_to_qname2(Table), 
          if_is_system_table(SKey,{?binary_to_existing_atom(S),?binary_to_existing_atom(T)})
      catch
          _:_ -> false
      end.
  
  add_attribute(_SKey, A, Opts) ->                imem_meta:add_attribute(A, Opts).
  
  update_opts(_SKey, T, Opts) ->                  imem_meta:update_opts(T, Opts).
  
  %% imem_if but security context added --- META INFORMATION ------
  
  schema(SKey) ->
      seco_authorized(SKey),
      imem_meta:schema().
  
  schema(SKey, Node) ->
      seco_authorized(SKey),
      imem_meta:schema(Node).
  
  system_id(_Skey) ->
      imem_meta:system_id().
  
  is_system_table(SKey, Table) ->
      seco_authorized(SKey),    
      if_is_system_table(SKey, Table).
  
  meta_field_list(_SKey) ->
      imem_meta:meta_field_list().
  
  meta_field(SKey, Name) when is_atom(Name) ->
      meta_field(SKey, ?atom_to_binary(Name));
  meta_field(_SKey, Name) ->
      case lists:member(Name,?SECO_FIELDS) of
          true ->     true;
          false ->    imem_meta:meta_field(Name)
      end.
  
  meta_field_info(_SKey, Name) ->
      imem_meta:meta_field_info(Name).
  
  meta_field_value(SKey, <<"user">>) ->        imem_seco:account_id(SKey);
  meta_field_value(SKey, user) ->              imem_seco:account_id(SKey);
  meta_field_value(SKey, <<"username">>) ->    imem_seco:account_name(SKey);
  meta_field_value(SKey, username) ->          imem_seco:account_name(SKey);
  meta_field_value(_SKey, Name) ->             imem_meta:meta_field_value(Name).
  
  column_map(_SKey, Tables, Columns) ->
      imem_sql:column_map(Tables, Columns).
  