I'm not sure if this is an issue, but I've been hitting my head against the wall for several hours. My Admin user can send emails and my Regular users can't.
I'm really frustrated because I cannot find the root of the problem. I believe that I'm missing something really silly, like some permission I'm not seeing or something.
The user cannot send either on a personal mail or in a group email. In the group mail configuration for SMTP sharing is allowed.
Anyway, when I try to send an email I get the following:
Concerning the emails, the user has email enabled. The following is the extract of the user's access as seen by the admin user.
Here is the log file with debug and trace enabled.
I'm using the installation of docker compose (based on https://github.com/espocrm/espocrm-i...odes/ssl/nginx)
Anyway, any shred of light is deeply appreciated. I'll be still debugging and I'll be back if I get the solution (even though it might be a silly one). I believe it has to do with the fact that I'm still getting to know the software.
P.S. I've been kindly redirected to this forum by Yurii Kuznietsov in the following url: https://github.com/espocrm/espocrm/issues/3235
Update: I tried to use an API user and it's the same as the regular user, I get a 403. Thus, email works with admin user, but not with regular user nor API user. Thus, I believe it is role permission inherited from team group. However, I have no idea what to do next. Also, simple logs of what happen in testmail and email for a personal email account as regular user.
I'm really frustrated because I cannot find the root of the problem. I believe that I'm missing something really silly, like some permission I'm not seeing or something.
The user cannot send either on a personal mail or in a group email. In the group mail configuration for SMTP sharing is allowed.
Anyway, when I try to send an email I get the following:
Concerning the emails, the user has email enabled. The following is the extract of the user's access as seen by the admin user.
Here is the log file with debug and trace enabled.
Code:
[2024-12-06 19:50:39] DEBUG: API (403) Assignment failure: assigned user or team not allowed.; POST /Email; Input data: {"status":"Sending","isRead":true,"isImportant":fa lse,"inTrash":false,"inArchive":false,"folderId":n ull,"isUsers":false,"isHtml":true,"isSystem":false ,"isJustSent":false,"assignedUsersIds":["6750950e4452e02e6"],"assignedUsersNames":{"6750950e4452e02e6":"sil gon Islas"},"from":"some@mail.com","to":"another@gmail .com","cc":"","bcc":"","parentType":null,"parentNa me":null,"parentId":null,"selectTemplateName":null ,"selectTemplateId":null,"subject":"aoehcr","name" :"aoehcr","attachmentsIds":[],"body":"<p>hcr<br></p>","bodyPlain":"hcr\n\n\n"}; Route pattern: /{controller}; Route params: Array ( [controller] => Email [action] => create ) [2024-12-06 19:50:39] WARNING: (403) Assignment failure: assigned user or team not allowed. :: POST /Email :: /var/www/html/application/Espo/Core/Record/Service.php(504) [object] (Espo\Core\Exceptions\Forbidden(code: 403): Assignment failure: assigned user or team not allowed. at /var/www/html/application/Espo/Core/Record/Service.php:504) [stacktrace] #0 /var/www/html/application/Espo/Core/Record/Service.php(851): Espo\Core\Record\Service->processAssignmentCheck(Object(Espo\Entities\Email )) #1 /var/www/html/application/Espo/Services/Email.php(74): Espo\Core\Record\Service->create(Object(stdClass), Object(Espo\Core\Record\CreateParams)) #2 /var/www/html/application/Espo/Core/Controllers/RecordBase.php(183): Espo\Services\Email->create(Object(stdClass), Object(Espo\Core\Record\CreateParams)) #3 /var/www/html/application/Espo/Core/Api/ControllerActionProcessor.php(87): Espo\Core\Controllers\RecordBase->postActionCreate(Object(Espo\Core\Api\RequestWrap per), Object(Espo\Core\Api\ResponseWrapper)) #4 /var/www/html/application/Espo/Core/Api/ControllerActionHandler.php(65): Espo\Core\Api\ControllerActionProcessor->process('Email', 'create', Object(Espo\Core\Api\RequestWrapper), Object(Espo\Core\Api\ResponseWrapper)) #5 /var/www/html/vendor/slim/slim/Slim/MiddlewareDispatcher.php(65): Espo\Core\Api\ControllerActionHandler->handle(Object(Slim\Psr7\Request)) #6 /var/www/html/application/Espo/Core/Api/RouteProcessor.php(222): Slim\MiddlewareDispatcher->handle(Object(Slim\Psr7\Request)) #7 /var/www/html/application/Espo/Core/Api/RouteProcessor.php(149): Espo\Core\Api\RouteProcessor->processControllerAction(Object(Espo\Core\Api\Proc essData), Object(Slim\Psr7\Request), Object(Espo\Core\Api\ResponseWrapper)) #8 /var/www/html/application/Espo/Core/Api/RouteProcessor.php(127): Espo\Core\Api\RouteProcessor->processAfterAuth(Object(Espo\Core\Api\ProcessData ), Object(Slim\Psr7\Request), Object(Espo\Core\Api\ResponseWrapper)) #9 /var/www/html/application/Espo/Core/Api/RouteProcessor.php(78): Espo\Core\Api\RouteProcessor->processInternal(Object(Espo\Core\Api\ProcessData) , Object(Slim\Psr7\Request), Object(Espo\Core\Api\RequestWrapper), Object(Espo\Core\Api\ResponseWrapper)) #10 /var/www/html/application/Espo/Core/Api/Starter.php(109): Espo\Core\Api\RouteProcessor->process(Object(Espo\Core\Api\ProcessData), Object(Slim\Psr7\Request), Object(Slim\Psr7\Response)) #11 /var/www/html/vendor/slim/slim/Slim/Handlers/Strategies/RequestResponse.php(38): Espo\Core\Api\Starter->Espo\Core\Api\{closure}(Object(Slim\Psr7\Request) , Object(Slim\Psr7\Response), Array) #12 /var/www/html/vendor/slim/slim/Slim/Routing/Route.php(358): Slim\Handlers\Strategies\RequestResponse->__invoke(Object(Closure), Object(Slim\Psr7\Request), Object(Slim\Psr7\Response), Array) #13 /var/www/html/vendor/slim/slim/Slim/MiddlewareDispatcher.php(65): Slim\Routing\Route->handle(Object(Slim\Psr7\Request)) #14 /var/www/html/vendor/slim/slim/Slim/MiddlewareDispatcher.php(65): Slim\MiddlewareDispatcher->handle(Object(Slim\Psr7\Request)) #15 /var/www/html/vendor/slim/slim/Slim/Routing/Route.php(315): Slim\MiddlewareDispatcher->handle(Object(Slim\Psr7\Request)) #16 /var/www/html/vendor/slim/slim/Slim/Routing/RouteRunner.php(68): Slim\Routing\Route->run(Object(Slim\Psr7\Request)) #17 /var/www/html/vendor/slim/slim/Slim/Middleware/RoutingMiddleware.php(45): Slim\Routing\RouteRunner->handle(Object(Slim\Psr7\Request)) #18 /var/www/html/vendor/slim/slim/Slim/MiddlewareDispatcher.php(121): Slim\Middleware\RoutingMiddleware->process(Object(Slim\Psr7\Request), Object(Slim\Routing\RouteRunner)) #19 /var/www/html/vendor/slim/slim/Slim/Middleware/ErrorMiddleware.php(76): Psr\Http\Server\RequestHandlerInterface@anonymous->handle(Object(Slim\Psr7\Request)) #20 /var/www/html/vendor/slim/slim/Slim/MiddlewareDispatcher.php(121): Slim\Middleware\ErrorMiddleware->process(Object(Slim\Psr7\Request), Object(Psr\Http\Server\RequestHandlerInterface@ano nymous)) #21 /var/www/html/vendor/slim/slim/Slim/MiddlewareDispatcher.php(65): Psr\Http\Server\RequestHandlerInterface@anonymous->handle(Object(Slim\Psr7\Request)) [NODE="22"]Unminify assets or how to recreate t...o.min.js file?[/NODE] /var/www/html/vendor/slim/slim/Slim/App.php(199): Slim\MiddlewareDispatcher->handle(Object(Slim\Psr7\Request)) [NODE="23"]Unminify assets or how to recreate t...o.min.js file?[/NODE] /var/www/html/vendor/slim/slim/Slim/App.php(183): Slim\App->handle(Object(Slim\Psr7\Request)) #24 /var/www/html/application/Espo/Core/Api/Starter.php(76): Slim\App->run() [NODE="25"]Unminify assets or how to recreate t...o.min.js file?[/NODE] /var/www/html/application/Espo/Core/ApplicationRunners/Api.php(45): Espo\Core\Api\Starter->start() [NODE="26"]how to upgrade ?[/NODE] /var/www/html/application/Espo/Core/Application/RunnerRunner.php(84): Espo\Core\ApplicationRunners\Api->run() [NODE="27"]how to upgrade ?[/NODE] /var/www/html/application/Espo/Core/Application.php(78): Espo\Core\Application\RunnerRunner->run('Espo\\Core\\Appli...', NULL) #28 /var/www/html/public/api/v1/index.php(35): Espo\Core\Application->run('Espo\\Core\\Appli...') #29 {main}
Anyway, any shred of light is deeply appreciated. I'll be still debugging and I'll be back if I get the solution (even though it might be a silly one). I believe it has to do with the fact that I'm still getting to know the software.
P.S. I've been kindly redirected to this forum by Yurii Kuznietsov in the following url: https://github.com/espocrm/espocrm/issues/3235
Update: I tried to use an API user and it's the same as the regular user, I get a 403. Thus, email works with admin user, but not with regular user nor API user. Thus, I believe it is role permission inherited from team group. However, I have no idea what to do next. Also, simple logs of what happen in testmail and email for a personal email account as regular user.
Code:
[2024-12-06 22:04:21] WARNING: (403) Assignment failure: assigned user or team not allowed. :: POST /Email :: /var/www/html/application/Espo/Core/Record/Service.php(504) [2024-12-06 22:07:16] WARNING: (403) :: POST /Email/sendTest :: /var/www/html/application/Espo/Tools/Email/SendService.php(651)
Comment