email address search check email create access

This commit is contained in:
yuri
2016-02-05 16:06:07 +02:00
parent d0f715863c
commit e727196424
2 changed files with 10 additions and 3 deletions

View File

@@ -38,6 +38,9 @@ class EmailAddress extends \Espo\Core\Controllers\Record
if (!$this->getAcl()->checkScope('Email')) {
throw new Forbidden();
}
if (!$this->getAcl()->checkScope('Email', 'create')) {
throw new Forbidden();
}
$q = $request->get('q');
$limit = intval($request->get('limit'));
if (empty($limit) || $limit > 30) {