Skip to content

Commit

Permalink
Improve performance of User API (#4376)
Browse files Browse the repository at this point in the history
  • Loading branch information
danrot authored and chirimoya committed Jan 21, 2019
1 parent b61d24c commit 74d1738
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -3,6 +3,7 @@ CHANGELOG for Sulu

* release/1.5
* ENHANCEMENT #4367 [WebsiteBundle] Remove false deprecation of WebsiteController::renderStructure
* BUGFIX #4376 [SecurityBundle] Exclude role permissions in user API to improve performance

* 1.5.20 (2019-01-09)
* ENHANCEMENT #4319 [MediaBundle] Added possibility to have a image format configuration file without formats
Expand Down
7 changes: 7 additions & 0 deletions UPGRADE.md
@@ -1,5 +1,12 @@
# Upgrade

## dev-release/1.5

### User API performance improvement

The API at `/admin/api/users/{id}` does not contain the `permissions` field of the roles anymore, because it caused
problems if many webspaces are configured.

## 1.5.15

Added method `hasType` to `Sulu\Component\Content\Compat\Block\BlockPropertyInterface`.
Expand Down
2 changes: 2 additions & 0 deletions src/Sulu/Bundle/SecurityBundle/Entity/Role.php
Expand Up @@ -14,6 +14,7 @@
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use JMS\Serializer\Annotation\Exclude;
use JMS\Serializer\Annotation\Groups;
use Sulu\Component\Security\Authentication\RoleSettingInterface;

/**
Expand All @@ -23,6 +24,7 @@ class Role extends BaseRole
{
/**
* @var Collection
* @Groups({"fullRole"})
*/
private $permissions;

Expand Down

0 comments on commit 74d1738

Please sign in to comment.