replace tabs with spaces

This commit is contained in:
Yuri Kuznetsov
2014-10-20 11:13:16 +03:00
parent f062c08b31
commit dc3f6080c9
1117 changed files with 62189 additions and 62189 deletions

View File

@@ -27,31 +27,31 @@ use \Espo\Core\Exceptions\NotFound;
use \Espo\Core\Exceptions\Forbidden;
class User extends \Espo\Core\Controllers\Record
{
public function actionAcl($params, $data, $request)
{
$userId = $request->get('id');
if (empty($userId)) {
throw new Error();
}
if (!$this->getUser()->isAdmin() && $this->getUser()->id != $userId) {
throw new Forbidden();
}
$user = $this->getEntityManager()->getEntity('User', $userId);
if (empty($user)) {
throw new NotFound();
}
$acl = new \Espo\Core\Acl($user, $this->getConfig(), $this->getContainer()->get('fileManager'), $this->getMetadata());
return $acl->toArray();
}
public function actionChangeOwnPassword($params, $data)
{
return $this->getService('User')->changePassword($this->getUser()->id, $data['password']);
}
{
public function actionAcl($params, $data, $request)
{
$userId = $request->get('id');
if (empty($userId)) {
throw new Error();
}
if (!$this->getUser()->isAdmin() && $this->getUser()->id != $userId) {
throw new Forbidden();
}
$user = $this->getEntityManager()->getEntity('User', $userId);
if (empty($user)) {
throw new NotFound();
}
$acl = new \Espo\Core\Acl($user, $this->getConfig(), $this->getContainer()->get('fileManager'), $this->getMetadata());
return $acl->toArray();
}
public function actionChangeOwnPassword($params, $data)
{
return $this->getService('User')->changePassword($this->getUser()->id, $data['password']);
}
}