~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/authorization.cc

  • Committer: Brian Aker
  • Date: 2010-12-23 20:54:14 UTC
  • mfrom: (2022.2.1 clean)
  • mto: (2026.1.2 build)
  • mto: This revision was merged to the branch mainline in revision 2025.
  • Revision ID: brian@tangent.org-20101223205414-2xvdkdp77t0rvutg
Merge in session list.

Show diffs side-by-side

added added

removed removed

Lines of Context:
208
208
                                         const Session *session,
209
209
                                         bool send_error)
210
210
{
 
211
  return isAuthorized(*user_ctx, session, send_error);
 
212
}
 
213
 
 
214
bool plugin::Authorization::isAuthorized(drizzled::identifier::User::const_reference user_ctx,
 
215
                                         const Session *session,
 
216
                                         bool send_error)
 
217
{
211
218
  drizzled::identifier::User::const_shared_ptr session_ctx= session->user();
212
219
 
213
220
  /* If we never loaded any authorization plugins, just return true */
218
225
  std::vector<plugin::Authorization *>::const_iterator iter=
219
226
    std::find_if(authorization_plugins.begin(),
220
227
                 authorization_plugins.end(),
221
 
                 RestrictProcessFunctor(*user_ctx, *session_ctx));
 
228
                 RestrictProcessFunctor(user_ctx, *session_ctx));
222
229
 
223
230
  /*
224
231
   * If iter is == end() here, that means that all of the plugins returned
234
241
    }
235
242
    return false;
236
243
  }
 
244
 
237
245
  return true;
238
246
}
239
247