user controller restore lost code

This commit is contained in:
yuri
2019-01-15 11:45:20 +02:00
parent ae18ce444c
commit dc4c4c3742

View File

@@ -106,6 +106,13 @@ class User extends \Espo\Core\Controllers\Record
return $this->getService('User')->passwordChangeRequest($userName, $emailAddress, $url);
}
public function postActionGenerateNewApiKey($params, $data, $request)
{
if (empty($data->id)) throw new BadRequest();
if (!$this->getUser()->isAdmin()) throw new Forbidden();
return $this->getRecordService()->generateNewApiKeyForEntity($data->id)->getValueMap();
}
public function actionCreateLink($params, $data, $request)
{
if (!$this->getUser()->isAdmin()) throw new Forbidden();