Customizing error messages in bit operation permission classes generated by BasePermissionMetaclass #9518
-
The DRF supports bit operations between permission classes that inherited BasePermission.
And the DRF supports bit operations between permission classes that inherited BasePermission.
In example codes such as TestView above, OR class objects are created through bit operations between permission classes, and if there are customized message attributes in each permission class delivered by the OR class generation argument, how should each message be applied to the OR class object? The same applies to other bit operations besides or, and the current code has no choice but to use the default message regardless of the properties of the permission class delivered by the arguments. If the And permission class created using the & operator exists and one of the permission classes passed by the argument fails, is the method to use the message set in the failed permission class a user has to implement? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Yes agree it’s non-obvious what messaging would be expected here.
|
Beta Was this translation helpful? Give feedback.
Yes agree it’s non-obvious what messaging would be expected here.
We’re not likely to do anything about this as…