Add AuthenticationServiceProvider

This commit is contained in:
Romain Neutron
2013-02-15 11:12:22 +01:00
parent d2bc4f4a23
commit 6537b96f4c
30 changed files with 158 additions and 173 deletions

View File

@@ -233,11 +233,11 @@ class User_Query implements User_QueryInterface
}
if ($this->only_templates === true) {
$sql .= ' AND model_of = ' . $this->app['phraseanet.user']->get_id();
$sql .= ' AND model_of = ' . $this->app['authentication']->getUser()->get_id();
} elseif ($this->include_templates === false) {
$sql .= ' AND model_of=0';
} else {
$sql .= ' AND (model_of=0 OR model_of = ' . $this->app['phraseanet.user']->get_id() . ' ) ';
$sql .= ' AND (model_of=0 OR model_of = ' . $this->app['authentication']->getUser()->get_id() . ' ) ';
}
if ($this->activities) {