~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/generator/schema.h

  • Committer: Brian Aker
  • Date: 2011-01-29 23:08:49 UTC
  • mto: This revision was merged to the branch mainline in revision 2128.
  • Revision ID: brian@tangent.org-20110129230849-ga5zr8fq1bavtygz
Merge in changes for catalogs usage of constants for identifier.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
#ifndef DRIZZLED_GENERATOR_SCHEMA_H
22
22
#define DRIZZLED_GENERATOR_SCHEMA_H
23
23
 
24
 
#include "drizzled/session.h"
25
 
#include "drizzled/plugin/storage_engine.h"
 
24
#include <drizzled/session.h>
 
25
#include <drizzled/plugin/authorization.h>
 
26
#include <drizzled/plugin/storage_engine.h>
26
27
 
27
28
namespace drizzled {
28
29
namespace generator {
44
45
    while (schema_iterator != schema_names.end())
45
46
    {
46
47
      identifier::Schema schema_identifier(*schema_iterator);
 
48
 
 
49
      if (not plugin::Authorization::isAuthorized(session.user(), schema_identifier, false))
 
50
      {
 
51
        schema_iterator++;
 
52
        continue;
 
53
      }
 
54
 
47
55
      bool is_schema_parsed= plugin::StorageEngine::getSchemaDefinition(schema_identifier, schema);
48
56
      schema_iterator++;
49
57
 
61
69
      const drizzled::identifier::Schema *_ptr= &(*schema_iterator);
62
70
      schema_iterator++;
63
71
 
 
72
      if (not plugin::Authorization::isAuthorized(session.user(), *_ptr, false))
 
73
        continue;
 
74
 
64
75
      return _ptr;
65
76
    }
66
77