diff --git a/press/press/doctype/site_activity/site_activity.json b/press/press/doctype/site_activity/site_activity.json index 646a580ade..b25c051cf0 100644 --- a/press/press/doctype/site_activity/site_activity.json +++ b/press/press/doctype/site_activity/site_activity.json @@ -29,7 +29,7 @@ "in_list_view": 1, "in_standard_filter": 1, "label": "Action", - "options": "Activate Site\nAdd Domain\nArchive\nBackup\nCreate\nClear Cache\nDeactivate Site\nInstall App\nLogin as Administrator\nMigrate\nReinstall\nRestore\nSuspend Site\nUninstall App\nUnsuspend Site\nUpdate\nUpdate Configuration\nDrop Offsite Backups\nEnable Database Access\nDisable Database Access", + "options": "Activate Site\nAdd Domain\nArchive\nBackup\nCreate\nClear Cache\nDeactivate Site\nInstall App\nLogin as Administrator\nMigrate\nReinstall\nRestore\nSuspend Site\nUninstall App\nUnsuspend Site\nUpdate\nUpdate Configuration\nDrop Offsite Backups\nEnable Database Access\nDisable Database Access\nCreate Database User\nRemove Database User\nModify Database User Permissions", "read_only": 1, "reqd": 1, "search_index": 1 @@ -56,7 +56,7 @@ ], "index_web_pages_for_search": 1, "links": [], - "modified": "2024-10-20 18:48:39.472990", + "modified": "2024-11-26 11:53:47.035359", "modified_by": "Administrator", "module": "Press", "name": "Site Activity", diff --git a/press/press/doctype/site_activity/site_activity.py b/press/press/doctype/site_activity/site_activity.py index cec765d1a0..9c492f2a90 100644 --- a/press/press/doctype/site_activity/site_activity.py +++ b/press/press/doctype/site_activity/site_activity.py @@ -36,6 +36,9 @@ class SiteActivity(Document): "Drop Offsite Backups", "Enable Database Access", "Disable Database Access", + "Create Database User", + "Remove Database User", + "Modify Database User Permissions", ] job: DF.Link | None reason: DF.SmallText | None diff --git a/press/press/doctype/site_database_user/site_database_user.py b/press/press/doctype/site_database_user/site_database_user.py index 88b1cd3f98..30d5f0a85c 100644 --- a/press/press/doctype/site_database_user/site_database_user.py +++ b/press/press/doctype/site_database_user/site_database_user.py @@ -71,7 +71,9 @@ def before_insert(self): def after_insert(self): log_site_activity( - self.site, "Create Database User", reason=f"Created user {self.username} with {self.mode} mode" + self.site, + "Create Database User", + reason=f"Created user {self.username} with {self.mode} permission", ) if hasattr(self.flags, "ignore_after_insert_hooks") and self.flags.ignore_after_insert_hooks: """ @@ -85,7 +87,7 @@ def on_update(self): log_site_activity( self.site, "Remove Database User", - reason=f"Removed user {self.username} with {self.mode} mode", + reason=f"Removed user {self.username} with {self.mode} permission", ) def _raise_error_if_archived(self): @@ -192,7 +194,7 @@ def modify_permissions(self): log_site_activity( self.site, "Modify Database User Permissions", - reason=f"Modified user {self.username} with {self.mode} mode", + reason=f"Modified user {self.username} with {self.mode} permission", ) server = frappe.db.get_value("Site", self.site, "server") agent = Agent(server)