~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/session.h

  • Committer: Brian Aker
  • Date: 2010-12-18 10:14:05 UTC
  • mfrom: (2008.1.3 clean)
  • Revision ID: brian@tangent.org-20101218101405-qjbse29shi9coklg
Merge of user identifier work

Show diffs side-by-side

added added

removed removed

Lines of Context:
47
47
#include <map>
48
48
#include <string>
49
49
 
50
 
#include "drizzled/security_context.h"
 
50
#include "drizzled/identifier.h"
51
51
#include "drizzled/open_tables_state.h"
52
52
#include "drizzled/internal_error_handler.h"
53
53
#include "drizzled/diagnostics_area.h"
567
567
  char *thread_stack;
568
568
 
569
569
private:
570
 
  SecurityContext security_ctx;
 
570
  identifier::User::shared_ptr security_ctx;
571
571
 
572
572
  int32_t scoreboard_index;
573
573
 
576
576
    assert(this->dbug_sentry == Session_SENTRY_MAGIC);
577
577
  }
578
578
public:
579
 
  const SecurityContext& getSecurityContext() const
 
579
  identifier::User::const_shared_ptr user() const
580
580
  {
581
 
    return security_ctx;
 
581
    if (security_ctx)
 
582
      return security_ctx;
 
583
 
 
584
    return identifier::User::const_shared_ptr();
582
585
  }
583
586
 
584
 
  SecurityContext& getSecurityContext()
 
587
  void setUser(identifier::User::shared_ptr arg)
585
588
  {
586
 
    return security_ctx;
 
589
    security_ctx= arg;
587
590
  }
588
591
 
589
592
  int32_t getScoreboardIndex()