~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/generator/schema.cc

merge lp:~linuxjedi/drizzle/trunk-remove-drizzleadmin

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19
19
 */
20
20
 
21
 
#include "config.h"
 
21
#include <config.h>
22
22
 
23
 
#include "drizzled/generator.h"
 
23
#include <drizzled/generator.h>
 
24
#include <drizzled/session.h>
24
25
 
25
26
using namespace std;
26
27
 
45
46
  {
46
47
    identifier::Schema schema_identifier(*schema_iterator);
47
48
 
48
 
    if (not plugin::Authorization::isAuthorized(session.user(), schema_identifier, false))
 
49
    if (not plugin::Authorization::isAuthorized(*session.user(), schema_identifier, false))
49
50
    {
50
51
      schema_iterator++;
51
52
      continue;
52
53
    }
53
54
 
54
 
    bool is_schema_parsed= plugin::StorageEngine::getSchemaDefinition(schema_identifier, schema);
 
55
    schema= plugin::StorageEngine::getSchemaDefinition(schema_identifier);
55
56
    schema_iterator++;
56
57
 
57
 
    if (is_schema_parsed)
 
58
    if (schema)
58
59
      return schema;
59
60
  }
60
61
 
68
69
    const drizzled::identifier::Schema *_ptr= &(*schema_iterator);
69
70
    schema_iterator++;
70
71
 
71
 
    if (not plugin::Authorization::isAuthorized(session.user(), *_ptr, false))
 
72
    if (not plugin::Authorization::isAuthorized(*session.user(), *_ptr, false))
72
73
      continue;
73
74
 
74
75
    return _ptr;