Skip to content

Conversation

@atif09
Copy link

@atif09 atif09 commented Dec 16, 2025

Add reusable mixins to hide sensitive model fields from non-superusers in both admin interface and REST API

Fixes #448

Checklist

  • I have read the OpenWISP Contributing Guidelines.
  • I have manually tested the changes proposed in this pull request.
  • I have written new test cases for new code and/or updated existing tests for changes to existing code.
  • I have updated the documentation.

Reference to Existing Issue

Closes #448

Description of Changes

  • Added: SensitiveFieldsAdminMixin which automatically hides sensitive model fields in Django admin forms for non-superusers while keeping them read only.
  • Added: SensitiveFieldsSerializerMixin which automatically removes sensitive model fields from API responses for non superusers

Screenshot

N/A

…zerMixin openwisp#448

Add reusable mixins to hide sensitive model fields from non-superusers
in both admin interface and REST API.

Fixes openwisp#448
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[feature] Restrict access to sensitive fields for non-superuser

1 participant