public function getPermissions($type, $identifier)
    {
        $accessControls = $this->accessControlRepository->findByTypeAndId($type, $identifier);

        $permissions = [];
        foreach ($accessControls as $accessControl) {
            $permissions[$accessControl->getRole()->getId()] = $this->maskConverter->convertPermissionsToArray(
                $accessControl->getPermissions()
            );
        }

        return $permissions;
    }