-
-
Notifications
You must be signed in to change notification settings - Fork 155
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2611 from dpfaffenbauer/issue/2608
[MessengerBundle] add permission and check for permissions
- Loading branch information
Showing
10 changed files
with
97 additions
and
4 deletions.
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
src/CoreShop/Bundle/CoreBundle/Migrations/Version20240421093551.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace CoreShop\Bundle\CoreBundle\Migrations; | ||
|
||
use Doctrine\DBAL\Schema\Schema; | ||
use Doctrine\Migrations\AbstractMigration; | ||
use Pimcore\Model\User\Permission\Definition; | ||
|
||
final class Version20240421093551 extends AbstractMigration | ||
{ | ||
public function getDescription(): string | ||
{ | ||
return ''; | ||
} | ||
|
||
public function up(Schema $schema): void | ||
{ | ||
$permission = Definition::getByKey('coreshop_permission_messenger'); | ||
|
||
if (null === $permission) { | ||
$permission = new Definition(); | ||
$permission->setKey('coreshop_permission_messenger'); | ||
$permission->setCategory('coreshop_permission_group_coreshop'); | ||
$permission->save(); | ||
} | ||
} | ||
|
||
public function down(Schema $schema): void | ||
{ | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
src/CoreShop/Bundle/MessengerBundle/Migrations/Version20240421093216.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace CoreShop\Bundle\MessengerBundle\Migrations; | ||
|
||
use Doctrine\DBAL\Schema\Schema; | ||
use Doctrine\Migrations\AbstractMigration; | ||
use Pimcore\Model\User\Permission\Definition; | ||
|
||
final class Version20240421093216 extends AbstractMigration | ||
{ | ||
public function getDescription(): string | ||
{ | ||
return ''; | ||
} | ||
|
||
public function up(Schema $schema): void | ||
{ | ||
$permission = Definition::getByKey('coreshop_permission_messenger'); | ||
|
||
if (null === $permission) { | ||
$permission = new Definition(); | ||
$permission->setKey('coreshop_permission_messenger'); | ||
$permission->setCategory('coreshop_permission_group_coreshop'); | ||
$permission->save(); | ||
} | ||
} | ||
|
||
public function down(Schema $schema): void | ||
{ | ||
} | ||
} |
4 changes: 4 additions & 0 deletions
4
src/CoreShop/Bundle/MessengerBundle/Resources/config/pimcore/config.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters