Skip to content

Commit

Permalink
Fix permissions syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
engram-design committed Mar 7, 2022
1 parent c9346be commit f84b297
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/ImageResizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,11 @@ private function _registerCpRoutes(): void
private function _registerPermissions(): void
{
Event::on(UserPermissions::class, UserPermissions::EVENT_REGISTER_PERMISSIONS, function(RegisterUserPermissionsEvent $event) {
$event->permissions[Craft::t('image-resizer', 'Image Resizer')] = [
'imageResizer-resizeImage' => ['label' => Craft::t('image-resizer', 'Resize images')],
$event->permissions[] = [
'heading' => Craft::t('image-resizer', 'Image Resizer'),
'permissions' => [
'imageResizer-resizeImage' => ['label' => Craft::t('image-resizer', 'Resize images')],
],
];
});
}
Expand Down

0 comments on commit f84b297

Please sign in to comment.