Authorizing Attaching / Detaching not working #4693
-
Description:I have a Many-To-Many relation where I want prevent the attachment and detachment. Both methods in the policy are called and false is returned, but it is ignored. Is there something that prevents it or is it a bug? p.s.: I have a pivot table in between with simple int value. Looks like, that it does not makes a difference On another model I have Belongs-To relation, there the policy Detailed steps to reproduce the issue on a fresh Nova installation:Here my related classes to understand the situation: Here just the relevant part of the policies. All the other methods are returning true. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
you need to use |
Beta Was this translation helpful? Give feedback.
-
|
@crynobone thank you very much. Changed to attachAny{Model} and it works like expected. |
Beta Was this translation helpful? Give feedback.
you need to use
attachAnySchoolandattachAnySchoolYearto prevent attaching any.attach{Model}is used to filter the dropdown on the attaching page.