Closed MVKozlov closed 7 months ago
Where are you seeing this? In the browseable API?
Essentially you're seeing the docstring
for the wrapper function of the view: https://github.com/Pithikos/rest-framework-roles/blob/master/rest_framework_roles/patching.py#L69-L79
I think this would simply to patch __doc__
but would be helpful to be able and reproduce the issue since not sure where you see that
@MVKozlov OK, this fix was simple. Note I didn't try with drf-spectacular
but the fix is generic - preserving the docstring from the patched method, so it should just work.
Please try with the updated version: rest-framework-roles==1.0.6
This was visible in yaml output and Browsable API
Thanks, the fix works!
django 5.0.3 djangorestframework 3.15.0 rest-framework-roles 1.0.5 drf-spectacular 0.27.1
Old code, new issue:
Description for method api with enabled
view_permissions
returnA wrapped view is the view that was explicitly mentioned in view_permissions, hence it shall ALWAYS check for permissions.
instead ofReturn a current user.