is it an expected behavior for createOptionForm to skip the policy ?

Hi all, so i have the following code in one of my resource (attached as image too)
Select::make('categories')
->relationship('categories', 'name')
->createOptionForm([
TextInput::make('name')->required(),
ColorPicker::make('color')->required(),
])
->multiple()
->nullable()
->preload(),
Select::make('categories')
->relationship('categories', 'name')
->createOptionForm([
TextInput::make('name')->required(),
ColorPicker::make('color')->required(),
])
->multiple()
->nullable()
->preload(),
although my policy forbids creating, and it's working (i'm just returning false and i am using strictAuthorization() in my admin panel) as i don't see the create action in my category list resource page as attached. i am still able to create new records. so i just want to check if this is the expected behavior (so i can implement restriction through $operation) or is this a bug. i already checked the documentations and didn't see anything mentioned for this case. thanks in advanced
No description
No description
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?