openwisp / openwisp/openwisp-controller
[change] Limit controller operations on disabled organizations
@pandafy is already working on this.
Since Aug 5, 2026.
- Dominant language
- Python
- Stars
- 773
- Forks
- 315
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 14
Description
Is your feature request related to a problem? Please describe.
Follow-up of #1338 and #1365, which focused on deactivated devices, but while working on the decision matrix in OpenWISP Device Operation Analysis.ods we also identified several controller operations whose behavior should be tightened for disabled organizations.
A previous broad issue exists in #815, but it is closed and does not contain the actionable matrix details.
Describe the solution you'd like
flowchart TD
A["Organization Disabled<br/>is_active = False"]
A --> B["Controller Operation"]
B --> C["Device Lifecycle"]
B --> D["Provisioning & Configuration"]
B --> E["Cleanup & Consistency"]
C --> C1["BLOCK"]
D --> D1["BLOCK"]
E --> E1["ALLOW"]
C1 --> C2["Registration<br/>Re-registration"]
D1 --> D2["Template changes<br/>Imports<br/>WHOIS fetches<br/>Location updates<br/>Subnet provisioning<br/>VPN/Server writes<br/>CA renewal"]
E1 --> E2["Command status broadcasts<br/>Certificate revocation cleanup<br/>VPN peer removal<br/>Subnet cleanup<br/>Cache invalidation"]
A --> F["Deactivate devices belonging to disabled organization"]
Implement disabled-organization handling according to the Controller | Decision Matrix sheet, ignoring deactivated-device policy already handled in #1365.
Expected disabled-organization follow-up scope from the matrix:
- Deactivate devices when their organization is disabled.
- Block device registration or re-registration for disabled organizations.
- Keep read-only or cleanup operations allowed when they are needed for consistency, such as command status broadcasts, certificate revocation cleanup, subnet deprovisioning, VPN peer removal, and relevant cache invalidation.
- Skip or block mutating operations for disabled organizations, including template changes, group template application, WHOIS fetches, estimated-location updates, coordinate and location writes, imports, subnet provisioning, certificate checksum updates for device configs, and VPN/server writes that should not apply to disabled organization objects.
- Ensure CA renewal cannot be performed for a disabled organization while preserving the rule that revoked certificates cannot be renewed.
Describe alternatives you've considered
Leaving disabled-organization behavior unchanged would keep these cases inconsistent with the policy already documented in the decision matrix.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.