mirror of
https://github.com/amidaware/tacticalrmm.git
synced 2026-04-26 15:05:57 +03:00
[PR #22] [MERGED] Policy Check Finish #1499
Labels
No labels
In Process
bug
bug
dev-triage
documentation
duplicate
enhancement
fixed
good first issue
help wanted
integration
invalid
pull-request
question
requires agent update
security
ui tweak
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tacticalrmm#1499
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 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:
develop← Head:feature-policies-alerts📝 Commits (1)
eb50a81Policy Check Finish📊 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.