PMCORE-2540

This commit is contained in:
Julio Cesar Laura Avendaño
2020-12-14 20:49:52 +00:00
parent 81677b9bb1
commit 300ff70130
3 changed files with 165 additions and 0 deletions

View File

@@ -599,6 +599,32 @@ class Home extends Api
}
}
/**
* Get all users, paged optionally, can be sent a text to filter results by user information (first name, last name, username)
*
* @url GET /users
*
* @param string $text
* @param int $offset
* @param int $limit
*
* @return array
*
* @throws Exception
*
* @access protected
* @class AccessControl {@permission PM_CASES}
*/
public function getUsers($text = null, $offset = null, $limit = null)
{
try {
$users = User::getUsersForHome($text, $offset, $limit);
return $users;
} catch (Exception $e) {
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
}
}
/**
* Get the tasks counters for todo, draft, paused and unassigned
*