{"categories":[{"label":"Python Modules","url":"https://skillfed.io/packages/category/software-development-libraries-python-modules/8"},{"label":"WWW/HTTP","url":"https://skillfed.io/packages/category/internet-www-http/3"},{"label":"Application Frameworks","url":"https://skillfed.io/packages/category/software-development-libraries-application-frameworks/2"}],"enrichment":{"capability":"Adds role-based access control to Django REST Framework viewsets, allowing you to define different permissions, querysets, and serializers per user role without scattered conditional logic.","skillfed_tags":["rbac","django-rest-framework","permissions"],"use_cases":["Multi-tenant SaaS where admins see all data but regular users see only their own records","API with tiered access levels requiring different allowed actions per tier","REST API where different roles need different serializer fields exposed to each role","Reducing permission-check boilerplate in viewsets by centralizing role logic in filter classes","Filtering querysets dynamically based on user role without writing conditional logic in each view"],"what_it_does":"This package extends Django REST Framework with a role-based filtering system that lets you define different access rules per user role in a declarative way. Instead of writing multiple conditional checks throughout your viewset code, you create role filter classes that specify which actions are allowed, how to filter the queryset, which serializer to use, and how to configure it\u2014then attach them to your viewset. The framework automatically applies the right rules based on the user's role.\n\nYou define role filters by subclassing RoleFilter and setting a role_id, then implement methods like get_allowed_actions(), get_queryset(), get_serializer_class(), and get_serializer() to customize behavior per role. Your viewset inherits from RoleFilterModelViewSet and implements get_role_id() to determine the current user's role. The package handles permission checks and queryset/serializer selection automatically, keeping your view code clean and your role logic centralized.","worth_installing":"Yes, if you are building a Django REST Framework API with role-based access control and want to avoid scattered permission checks. The package is stable, has low install friction, and carries no known vulnerabilities. The main caveat is dormant maintenance\u2014last updated 2023-10-06\u2014so if you need active support or compatibility with very recent Django/DRF versions, verify compatibility first. For established projects with stable dependencies, this is a solid choice."},"id":"djangorestframework-role-filters","links":{"html":"https://skillfed.io/packages/djangorestframework-role-filters","md":"https://skillfed.io/packages/djangorestframework-role-filters.md","pypi":"https://pypi.org/project/djangorestframework-role-filters/"},"maintenance":{"status":"dormant"},"meta":{"latest_release":"2023-10-06","license_spdx":null,"license_treatment":"permissive","name":"djangorestframework-role-filters","python_support":"unspecified","summary":"django-rest-framework-role-filters"},"popularity":{"monthly_downloads":867136,"position":4858,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"1.1.0"}
