Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CC-34718 Removed ability to create new QS accounts. #14

Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion assets/Zed/js/modules/quicksight-analytics.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ $(document).ready(function () {
const frameOptions = {
url: embedUrl,
container: embedElement,
height: '700px',
width: '100%',
onChange: (changeEvent, metadata) => {
switch (changeEvent.eventName) {
Expand Down
12 changes: 7 additions & 5 deletions data/translation/Zed/de_DE.csv
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
"Author: A user who can create data sources, datasets, analyses, and dashboards. <br/>Reader: A user who has read-only access to dashboards.","Autor: Ein Benutzer, der Datenquellen, Datensätze, Analysen und Dashboards erstellen kann. <br/>Leser: Ein Benutzer, der nur Lesezugriff auf Dashboards hat."
"Select user role","Benutzerrolle auswählen"
Analytics,Analytics
"The user role for Analytics could not be set. Please try again later.","Die Benutzerrolle für Analytics konnte nicht eingerichtet werden. Bitte versuchen Sie es später noch einmal."
"The user role for Analytics could not be reset. Please contact your Spryker Success Manager.","Die Benutzerrolle für Analytics konnte nicht zurückgesetzt werden. Bitte kontaktieren Sie Ihren Spryker Success Manager."
"Please be aware that you will be the owner of all default assets (dashboards, analyses, datasets and data sources).","Bitte beachten Sie, dass Sie als Eigentümer aller Standard-Assets (Dashboards, Analysen, Datensätzen und Datenquellen) eingetragen werden."
"Please be aware that all Analytics dashboards and configurations, including your changes, will be reset and replaced with the default data. Also, all users will be detached from assets upon reset process. Owner of default assets will be replaced with the user who initiated the reset process by clicking this button.","Bitte beachten Sie, dass alle Dashboards und Konfigurationen, einschließlich Ihrer Änderungen, zurückgesetzt und durch die Analytics-Standarddaten ersetzt werden. Also, all users will be detached from assets upon reset process. Owner of default assets will be replaced with the user who initiated the reset process by clicking this button."
"Please be aware that all default Analytics assets (dashboards, analyses, datasets), including your changes in those, will be reset to the default state. Upon the reset process, all users will be detached from these assets, and the owner of default Analytics assets will be replaced with the user who initiated the reset process.","Bitte beachten Sie, dass alle Standard-Analytics-Assets (Dashboards, Analysen, Datensätze), einschließlich Ihrer Änderungen, auf den Standardzustand zurückgesetzt werden. Beim Zurücksetzen werden alle Benutzer von diesen Assets getrennt und der Besitzer der Standard-Analytics-Assets wird durch den Benutzer ersetzt, der den Zurücksetzungsprozess initiiert hat."
"An error occurred during the Analytics activation. Please try again by clicking the ""Enable Analytics"" button.","Bei der Aktivierung von Analytics ist ein Fehler aufgetreten. Bitte versuchen Sie es erneut, indem Sie auf die Taste ""Analytics aktivieren"" klicken."
"An error occurred during the Analytics reset. Please try again by clicking the ""Reset Analytics"" button.","Beim Zurücksetzen von Analytics ist ein Fehler aufgetreten. Bitte versuchen Sie es erneut, indem Sie auf die Taste ""Analytics zurücksetzen"" klicken."
"Spryker Analytics is not enabled yet","Spryker Analytics ist noch nicht eingeschaltet"
"You can enable Spryker Analytics to view and modify default dashboards with the ability to share them with other users.","Schalten Sie Spryker Analytics ein, um Standard-Dashboards anzuzeigen, zu bearbeiten und mit anderen Benutzern zu teilen."
"Analytics is not enabled yet","Analytics ist noch nicht eingeschaltet"
"You can enable Analytics to view and modify dashboards with the ability to share them with other users.","Schalten Sie Analytics ein, um Dashboards anzuzeigen, zu bearbeiten und mit anderen Benutzern zu teilen."
"Enable Analytics","Analytics einschalten"
"Reset Analytics","Analytics zurücksetzen"
"Spryker Analytics is being activated. Please wait 4-5 minutes and reload the page.","Spryker Analytics wird aktiviert. Bitte warten Sie 4-5 Minuten und laden Sie die Seite neu."
"Analytics is being activated. Please wait 3-5 minutes and reload the page.","Analytics wird aktiviert. Bitte warten Sie 3-5 Minuten und laden Sie die Seite neu."
"Analytics users have been successfully synchronized.","Analytics-Benutzer wurden erfolgreich synchronisiert."
"Synchronize Users","Benutzer synchronisieren"
"CSRF token is not valid.","CSRF-Token ist ungültig."
12 changes: 7 additions & 5 deletions data/translation/Zed/en_US.csv
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
"Author: A user who can create data sources, datasets, analyses, and dashboards. <br/>Reader: A user who has read-only access to dashboards.","Author: A user who can create data sources, datasets, analyses, and dashboards. <br/>Reader: A user who has read-only access to dashboards."
"Select user role","Select user role"
Analytics,Analytics
"The user role for Analytics could not be set. Please try again later.","The user role for Analytics could not be set. Please try again later."
"The user role for Analytics could not be reset. Please contact your Spryker Success Manager.","The user role for Analytics could not be reset. Please contact your Spryker Success Manager."
"Please be aware that you will be the owner of all default assets (dashboards, analyses, datasets and data sources).","Please be aware that you will be the owner of all default assets (dashboards, analyses, datasets and data sources)."
"Please be aware that all Analytics dashboards and configurations, including your changes, will be reset and replaced with the default data. Also, all users will be detached from assets upon reset process. Owner of default assets will be replaced with the user who initiated the reset process by clicking this button.","Please be aware that all Analytics dashboards and configurations, including your changes, will be reset and replaced with the default data. Also, all users will be detached from assets upon reset process. Owner of default assets will be replaced with the user who initiated the reset process by clicking this button."
"Please be aware that all default Analytics assets (dashboards, analyses, datasets), including your changes in those, will be reset to the default state. Upon the reset process, all users will be detached from these assets, and the owner of default Analytics assets will be replaced with the user who initiated the reset process.","Please be aware that all default Analytics assets (dashboards, analyses, datasets), including your changes in those, will be reset to the default state. Upon the reset process, all users will be detached from these assets, and the owner of default Analytics assets will be replaced with the user who initiated the reset process."
"An error occurred during the Analytics activation. Please try again by clicking the ""Enable Analytics"" button.","An error occurred during the Analytics activation. Please try again by clicking the ""Enable Analytics"" button."
"An error occurred during the Analytics reset. Please try again by clicking the ""Reset Analytics"" button.","An error occurred during the Analytics reset. Please try again by clicking the ""Reset Analytics"" button."
"Spryker Analytics is not enabled yet","Spryker Analytics is not enabled yet"
"You can enable Spryker Analytics to view and modify default dashboards with the ability to share them with other users.","You can enable Spryker Analytics to view and modify default dashboards with the ability to share them with other users."
"Analytics is not enabled yet","Analytics is not enabled yet"
"You can enable Analytics to view and modify dashboards with the ability to share them with other users.","You can enable Analytics to view and modify dashboards with the ability to share them with other users."
"Enable Analytics","Enable Analytics"
"Reset Analytics","Reset Analytics"
"Spryker Analytics is being activated. Please wait 4-5 minutes and reload the page.","Spryker Analytics is being activated. Please wait 4-5 minutes and reload the page."
"Analytics is being activated. Please wait 3-5 minutes and reload the page.","Analytics is being activated. Please wait 3-5 minutes and reload the page."
"Analytics users have been successfully synchronized.","Analytics users have been successfully synchronized."
"Synchronize Users","Synchronize Users"
"CSRF token is not valid.","CSRF token is not valid."
Original file line number Diff line number Diff line change
Expand Up @@ -43,25 +43,11 @@
<property name="status" type="string"/>
</transfer>

<transfer name="QuicksightUserRegisterResponse" strict="true">
<property name="errors" type="Error[]" singular="error"/>
<property name="quicksightUser" type="QuicksightUser"/>
</transfer>

<transfer name="QuicksightDeleteUserResponse" strict="true">
<property name="errors" type="Error[]" singular="error"/>
<property name="quicksightUser" type="QuicksightUser"/>
</transfer>

<transfer name="QuicksightUserRegisterRequest" strict="true">
<property name="awsAccountId" type="string"/>
<property name="email" type="string" />
<property name="identityType" type="string" />
<property name="namespace" type="string"/>
<property name="userRole" type="string" />
<property name="userName" type="string"/>
</transfer>

<transfer name="QuicksightDeleteUserRequest" strict="true">
<property name="awsAccountId" type="string"/>
<property name="principalId" type="string" />
Expand Down Expand Up @@ -266,19 +252,6 @@
<property name="errors" type="Error[]" singular="error"/>
</transfer>

<transfer name="QuicksightUpdateUserResponse" strict="true">
<property name="quicksightUser" type="QuicksightUser"/>
<property name="errors" type="Error[]" singular="error"/>
</transfer>

<transfer name="QuicksightUpdateUserRequest" strict="true">
<property name="awsAccountId" type="string"/>
<property name="email" type="string" />
<property name="namespace" type="string"/>
<property name="role" type="string" />
<property name="userName" type="string"/>
</transfer>

<transfer name="QuicksightDeleteDataSetRequest" strict="true">
<property name="awsAccountId" type="string"/>
<property name="dataSetId" type="string"/>
Expand Down
13 changes: 0 additions & 13 deletions src/SprykerEco/Zed/AmazonQuicksight/AmazonQuicksightConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -281,19 +281,6 @@ public function findAwsCredentialsToken(): ?string
: null;
}

/**
* Specification:
* - Defines if updating quicksight user role via user form is enabled.
*
* @api
*
* @return bool
*/
public function isQuicksightUserRoleUpdateEnabled(): bool
{
return false;
}

/**
* Specification:
* - Provides the starting path for the QuickSight console.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@ class AmazonQuicksightDependencyProvider extends AbstractBundleDependencyProvide
*/
public const SERVICE_TWIG = 'twig';

/**
* @uses \Spryker\Yves\Form\Plugin\Application\FormApplicationPlugin::SERVICE_FORM_CSRF_PROVIDER
*
* @var string
*/
public const SERVICE_FORM_CSRF_PROVIDER = 'form.csrf_provider';

/**
* @param \Spryker\Zed\Kernel\Container $container
*
Expand All @@ -71,6 +78,7 @@ public function provideCommunicationLayerDependencies(Container $container): Con
{
$container = parent::provideCommunicationLayerDependencies($container);
$container = $this->addUserFacade($container);
$container = $this->addFormCsrfProviderService($container);

return $container;
}
Expand Down Expand Up @@ -161,4 +169,18 @@ protected function addUtilEncodingService(Container $container): Container

return $container;
}

/**
* @param \Spryker\Zed\Kernel\Container $container
*
* @return \Spryker\Zed\Kernel\Container
*/
protected function addFormCsrfProviderService(Container $container): Container
{
$container->set(static::SERVICE_FORM_CSRF_PROVIDER, function (Container $container) {
return $container->getApplicationService(static::SERVICE_FORM_CSRF_PROVIDER);
});

return $container;
}
}
18 changes: 0 additions & 18 deletions src/SprykerEco/Zed/AmazonQuicksight/Business/Adder/ErrorAdder.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
namespace SprykerEco\Zed\AmazonQuicksight\Business\Adder;

use ArrayObject;
use Generated\Shared\Transfer\QuicksightUserCollectionResponseTransfer;
use Generated\Shared\Transfer\UserCollectionResponseTransfer;

class ErrorAdder implements ErrorAdderInterface
Expand All @@ -32,21 +31,4 @@ public function addErrorsToUserCollectionResponse(

return $userCollectionResponseTransfer;
}

/**
* @param \Generated\Shared\Transfer\QuicksightUserCollectionResponseTransfer $quicksightUserCollectionResponseTransfer
* @param \ArrayObject<array-key, \Generated\Shared\Transfer\ErrorTransfer> $errorTransfers
*
* @return \Generated\Shared\Transfer\QuicksightUserCollectionResponseTransfer
*/
public function addErrorsToQuicksightUserCollectionResponse(
QuicksightUserCollectionResponseTransfer $quicksightUserCollectionResponseTransfer,
ArrayObject $errorTransfers
): QuicksightUserCollectionResponseTransfer {
foreach ($errorTransfers as $errorTransfer) {
$quicksightUserCollectionResponseTransfer->addError($errorTransfer);
}

return $quicksightUserCollectionResponseTransfer;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
namespace SprykerEco\Zed\AmazonQuicksight\Business\Adder;

use ArrayObject;
use Generated\Shared\Transfer\QuicksightUserCollectionResponseTransfer;
use Generated\Shared\Transfer\UserCollectionResponseTransfer;

interface ErrorAdderInterface
Expand All @@ -25,15 +24,4 @@ public function addErrorsToUserCollectionResponse(
ArrayObject $errorTransfers,
string $entityIdentifier
): UserCollectionResponseTransfer;

/**
* @param \Generated\Shared\Transfer\QuicksightUserCollectionResponseTransfer $quicksightUserCollectionResponseTransfer
* @param \ArrayObject<array-key, \Generated\Shared\Transfer\ErrorTransfer> $errorTransfers
*
* @return \Generated\Shared\Transfer\QuicksightUserCollectionResponseTransfer
*/
public function addErrorsToQuicksightUserCollectionResponse(
QuicksightUserCollectionResponseTransfer $quicksightUserCollectionResponseTransfer,
ArrayObject $errorTransfers
): QuicksightUserCollectionResponseTransfer;
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@
use SprykerEco\Zed\AmazonQuicksight\Business\Mapper\AmazonQuicksightMapperInterface;
use SprykerEco\Zed\AmazonQuicksight\Business\Matcher\QuicksightUserMatcher;
use SprykerEco\Zed\AmazonQuicksight\Business\Matcher\QuicksightUserMatcherInterface;
use SprykerEco\Zed\AmazonQuicksight\Business\Processor\AssetBundleQuicksightUserProcessor;
use SprykerEco\Zed\AmazonQuicksight\Business\Processor\AssetBundleQuicksightUserProcessorInterface;
use SprykerEco\Zed\AmazonQuicksight\Business\Reader\QuicksightUserReader;
use SprykerEco\Zed\AmazonQuicksight\Business\Reader\QuicksightUserReaderInterface;
use SprykerEco\Zed\AmazonQuicksight\Business\Reader\UserReader;
Expand All @@ -51,8 +49,6 @@
use SprykerEco\Zed\AmazonQuicksight\Business\Synchronizer\QuicksightAssetBundleImportJobSynchronizerInterface;
use SprykerEco\Zed\AmazonQuicksight\Business\Updater\QuicksightAssetBundleImportJobUpdater;
use SprykerEco\Zed\AmazonQuicksight\Business\Updater\QuicksightAssetBundleImportJobUpdaterInterface;
use SprykerEco\Zed\AmazonQuicksight\Business\Updater\QuicksightUserUpdater;
use SprykerEco\Zed\AmazonQuicksight\Business\Updater\QuicksightUserUpdaterInterface;
use SprykerEco\Zed\AmazonQuicksight\Business\Validator\QuicksightAnalyticsRequestValidator;
use SprykerEco\Zed\AmazonQuicksight\Business\Validator\QuicksightAnalyticsRequestValidatorInterface;
use SprykerEco\Zed\AmazonQuicksight\Dependency\External\AmazonQuicksightToAwsQuicksightClientInterface;
Expand Down Expand Up @@ -90,14 +86,6 @@ public function createQuicksightUserCreator(): QuicksightUserCreatorInterface
);
}

/**
* @return \SprykerEco\Zed\AmazonQuicksight\Business\Updater\QuicksightUserUpdaterInterface
*/
public function createQuicksightUserUpdater(): QuicksightUserUpdaterInterface
{
return new QuicksightUserUpdater($this->createUserAmazonQuicksightApiClient(), $this->getEntityManager());
}

/**
* @return \SprykerEco\Zed\AmazonQuicksight\Business\Deleter\QuicksightUserDeleterInterface
*/
Expand Down Expand Up @@ -238,24 +226,11 @@ public function createAssetBundleEnabler(): AssetBundleEnablerInterface
$this->createQuicksightAssetBundleImportJobUpdater(),
$this->getRepository(),
$this->createQuicksightAnalyticsRequestValidator(),
$this->createAssetBundleQuicksightUserProcessor(),
$this->createAssetBundleImportFileContentLoader(),
$this->createDataSetDeleter(),
);
}

/**
* @return \SprykerEco\Zed\AmazonQuicksight\Business\Processor\AssetBundleQuicksightUserProcessorInterface
*/
public function createAssetBundleQuicksightUserProcessor(): AssetBundleQuicksightUserProcessorInterface
{
return new AssetBundleQuicksightUserProcessor(
$this->createQuicksightUserCreator(),
$this->createQuicksightUserUpdater(),
$this->getRepository(),
);
}

/**
* @return \SprykerEco\Zed\AmazonQuicksight\Business\Synchronizer\QuicksightAssetBundleImportJobSynchronizerInterface
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,23 +40,6 @@ public function expandUserCollectionWithQuicksightUsers(
return $this->getFactory()->createUserExpander()->expandUserCollectionWithQuicksightUsers($userCollectionTransfer);
}

/**
* {@inheritDoc}
*
* @api
*
* @param \Generated\Shared\Transfer\UserCollectionResponseTransfer $userCollectionResponseTransfer
*
* @return \Generated\Shared\Transfer\UserCollectionResponseTransfer
*/
public function createQuicksightUsersByUserCollectionResponse(
UserCollectionResponseTransfer $userCollectionResponseTransfer
): UserCollectionResponseTransfer {
return $this->getFactory()
->createQuicksightUserCreator()
->createQuicksightUsersByUserCollectionResponse($userCollectionResponseTransfer);
}

/**
* {@inheritDoc}
*
Expand Down Expand Up @@ -107,20 +90,6 @@ public function createMatchedQuicksightUsers(): QuicksightUserCollectionResponse
->createMatchedQuicksightUsers();
}

/**
* {@inheritDoc}
*
* @api
*
* @return \Generated\Shared\Transfer\QuicksightUserCollectionResponseTransfer
*/
public function deleteNotMatchedQuicksightUsers(): QuicksightUserCollectionResponseTransfer
{
return $this->getFactory()
->createQuicksightUserDeleter()
->deleteNotMatchedQuicksightUsers();
}

/**
* {@inheritDoc}
*
Expand Down
Loading
Loading