mirror of https://github.com/MISP/MISP
fix: [API] downloadAttachment API user object fetching fixed
- user is already in session, just reuse itpull/8035/head
parent
b869ff9154
commit
a546fc7919
|
@ -1740,7 +1740,7 @@ class AttributesController extends AppController
|
|||
if (!$this->Auth->user()) {
|
||||
throw new UnauthorizedException(__('You are not authorized. Please send the Authorization header with your auth key along with an Accept header for application/xml.'));
|
||||
}
|
||||
$user = $this->_checkAuthUser($this->Auth->user('authkey'));
|
||||
$user = $this->Auth->user();
|
||||
}
|
||||
// if the user is authorised to use the api key then user will be populated with the user's account
|
||||
// in addition we also set a flag indicating whether the user is a site admin or not.
|
||||
|
|
Loading…
Reference in New Issue