Skip to content

forced snake case on custom permissions #649

@codearachnid

Description

@codearachnid

Describe the bug
Unexpected shift of the defined custom permissions in config to be snake case after saving the RoleResource to attach permissions to the role. This is a problem as it changes the expected key for the role identifier and breaks convention of other saved permissions.

To Reproduce
Steps to reproduce the behavior:

  1. Seed custom permissions into the database
  2. Go to the Role Resource and edit a role
  3. Select custom permissions and click save
  4. The permissions table will show the new snake case permissions having overwritten the old ones.

Screenshots
defined custom permissions in config/filament-shield.php
Image

"offending code" https://github.com/bezhanSalleh/filament-shield/blame/c504c661b72c9cc07cd2090ca605f82f86aea4f4/src/Concerns/HasEntityTransformers.php#L79
Image

after saving the attached permissions to role
Image

please complete the following information:

  • OS: Laravel Herd (PHP 8.3)
  • Filament 4.0
  • Version 4.0.2

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions