Skip to content

Commit

Permalink
Returning custom field view permission (#13741)
Browse files Browse the repository at this point in the history
* Returning custom field view permission

* One more line got removed by accident

* Setting in the test that the fields have 2 permissions
  • Loading branch information
escopecz committed May 13, 2024
1 parent ca2bf45 commit f13b8a4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Expand Up @@ -25,6 +25,7 @@ public function __construct($params)
$this->permissions = [
'fields' => [
'full' => 1024,
'view' => 1,
],
];

Expand All @@ -51,6 +52,7 @@ public function buildForm(FormBuilderInterface &$builder, array $options, array
[
'choices' => [
'mautic.core.permissions.manage' => 'full',
'mautic.core.permissions.view' => 'view',
],
'label' => 'mautic.lead.permissions.fields',
'data' => (!empty($data['fields']) ? $data['fields'] : []),
Expand Down
Expand Up @@ -31,7 +31,7 @@ public function testRolePageForPermissionAvailability(): void
$this->assertEquals(8, $listsRole->count());

$fieldsRole = $crawler->filter('input[name="role[permissions][lead:fields][]"]');
$this->assertEquals(1, $fieldsRole->count());
$this->assertEquals(2, $fieldsRole->count());

$importsRole = $crawler->filter('input[name="role[permissions][lead:imports][]"]');
$this->assertEquals(6, $importsRole->count());
Expand Down

0 comments on commit f13b8a4

Please sign in to comment.