[PR #22] [MERGED] Policy Check Finish #3453

Closed
opened 2026-03-14 07:20:51 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/amidaware/tacticalrmm/pull/22
Author: @sadnub
Created: 6/10/2020
Status: Merged
Merged: 6/12/2020
Merged by: @wh1te909

Base: developHead: feature-policies-alerts


📝 Commits (1)

📊 Changes

36 files changed (+814 additions, -373 deletions)

View changed files

api/tacticalrmm/agents/migrations/0003_agent_checks_last_generated.py (+18 -0)
api/tacticalrmm/agents/migrations/0004_auto_20200604_1721.py (+22 -0)
api/tacticalrmm/agents/migrations/0005_agent_policy.py (+20 -0)
📝 api/tacticalrmm/agents/models.py (+25 -0)
📝 api/tacticalrmm/api/views.py (+5 -1)
📝 api/tacticalrmm/automation/__init__.py (+1 -0)
📝 api/tacticalrmm/automation/admin.py (+2 -1)
📝 api/tacticalrmm/automation/apps.py (+5 -1)
api/tacticalrmm/automation/migrations/0002_auto_20200604_1713.py (+31 -0)
api/tacticalrmm/automation/migrations/0003_auto_20200609_1607.py (+29 -0)
📝 api/tacticalrmm/automation/models.py (+158 -8)
📝 api/tacticalrmm/automation/serializers.py (+52 -4)
api/tacticalrmm/automation/signals.py (+51 -0)
📝 api/tacticalrmm/automation/urls.py (+3 -3)
📝 api/tacticalrmm/automation/views.py (+41 -54)
api/tacticalrmm/checks/migrations/0002_check_managed_by_policy.py (+18 -0)
api/tacticalrmm/checks/migrations/0003_check_overriden_by_policy.py (+18 -0)
api/tacticalrmm/checks/migrations/0004_check_parent_check.py (+18 -0)
📝 api/tacticalrmm/checks/models.py (+34 -0)
📝 api/tacticalrmm/checks/serializers.py (+1 -1)

...and 16 more files

📄 Description

Got the policy checks to work. The only remaining thing is to not allow the policy checks to be edited from the main table.

When an agent checks in to get checks, it will see if the policies_pending field is set. If so, it will generate checks and add them to the database.

I found that I can hook into the check and policy model save and delete actions. From there I can setting the agents policies_pending fields.

I also removed the many to many relations for the policies and made it so you can only add a single policy to a client, site, and agent.

It this looks good I can do the same thing for policy tasks.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/amidaware/tacticalrmm/pull/22 **Author:** [@sadnub](https://github.com/sadnub) **Created:** 6/10/2020 **Status:** ✅ Merged **Merged:** 6/12/2020 **Merged by:** [@wh1te909](https://github.com/wh1te909) **Base:** `develop` ← **Head:** `feature-policies-alerts` --- ### 📝 Commits (1) - [`eb50a81`](https://github.com/amidaware/tacticalrmm/commit/eb50a8134cfda3fe3fd5ccd348e90a6687f6ba80) Policy Check Finish ### 📊 Changes **36 files changed** (+814 additions, -373 deletions) <details> <summary>View changed files</summary> ➕ `api/tacticalrmm/agents/migrations/0003_agent_checks_last_generated.py` (+18 -0) ➕ `api/tacticalrmm/agents/migrations/0004_auto_20200604_1721.py` (+22 -0) ➕ `api/tacticalrmm/agents/migrations/0005_agent_policy.py` (+20 -0) 📝 `api/tacticalrmm/agents/models.py` (+25 -0) 📝 `api/tacticalrmm/api/views.py` (+5 -1) 📝 `api/tacticalrmm/automation/__init__.py` (+1 -0) 📝 `api/tacticalrmm/automation/admin.py` (+2 -1) 📝 `api/tacticalrmm/automation/apps.py` (+5 -1) ➕ `api/tacticalrmm/automation/migrations/0002_auto_20200604_1713.py` (+31 -0) ➕ `api/tacticalrmm/automation/migrations/0003_auto_20200609_1607.py` (+29 -0) 📝 `api/tacticalrmm/automation/models.py` (+158 -8) 📝 `api/tacticalrmm/automation/serializers.py` (+52 -4) ➕ `api/tacticalrmm/automation/signals.py` (+51 -0) 📝 `api/tacticalrmm/automation/urls.py` (+3 -3) 📝 `api/tacticalrmm/automation/views.py` (+41 -54) ➕ `api/tacticalrmm/checks/migrations/0002_check_managed_by_policy.py` (+18 -0) ➕ `api/tacticalrmm/checks/migrations/0003_check_overriden_by_policy.py` (+18 -0) ➕ `api/tacticalrmm/checks/migrations/0004_check_parent_check.py` (+18 -0) 📝 `api/tacticalrmm/checks/models.py` (+34 -0) 📝 `api/tacticalrmm/checks/serializers.py` (+1 -1) _...and 16 more files_ </details> ### 📄 Description Got the policy checks to work. The only remaining thing is to not allow the policy checks to be edited from the main table. When an agent checks in to get checks, it will see if the policies_pending field is set. If so, it will generate checks and add them to the database. I found that I can hook into the check and policy model save and delete actions. From there I can setting the agents policies_pending fields. I also removed the many to many relations for the policies and made it so you can only add a single policy to a client, site, and agent. It this looks good I can do the same thing for policy tasks. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-14 07:20:51 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/tacticalrmm#3453
No description provided.