Overview
Sometimes, you may want to generate a user history report containing details of the user that modified the respective page and module permissions.
This article provides information regarding the queries that will help you to find details of the modification of the page and module permissions.
Information
Page Permission Modification Details
Use the following query to find the details of the last user who modified the page permissions:
SELECT TabPermission.LastModifiedByUserID, Users.DisplayName, Users.Email, Tabs.TabName, TabPermission.PermissionID,Permission.PermissionName, TabPermission.CreatedOnDate, TabPermission.LastModifiedOnDate, TabPermission.RoleID, Roles.RoleName
FROM ((((Tabs INNER JOIN TabPermission ON Tabs.TabID = TabPermission.TabID)
INNER JOIN Users ON TabPermission.LastModifiedByUserID = Users.UserID)
INNER JOIN Permission ON TabPermission.PermissionID = Permission.PermissionID)
INNER JOIN Roles ON TabPermission.RoleID = Roles.RoleID)
WHERE Tabs.TabName like '%Name_of_page%';
Replace %Name_of_page%
with the name of the page whose report is required.
The following table describes the output of the query mentioned above:
Output Columns |
Description |
lastModifiedByUserID |
Id for the user who made the last change |
DisplayName |
Username of the user who made the last change |
Email for the user who made the last change |
|
TabName |
Page Name |
PermissionID |
ID for permission that has been changed |
PermissionName |
Name of the permission that has been changed |
CreateOnDate |
Date of creating permission on the page |
LastModifiedOnDate |
Date of last modification on the page |
RoleID |
ID for the role that has been changed |
RoleName |
Name for the role that has been changed (this indicates the role that has permissions to view the page) |
Module Permission Modification Details
Use the following query to find details of the last user who modified the module permissions:
SELECT Users.DisplayName, Users.Email, ModuleDefinitions.FriendlyName, ModulePermission.PermissionID, Permission.PermissionName, ModuleDefinitions.LastModifiedOnDate, ModulePermission.RoleID, Roles.RoleName
FROM (((((ModulePermission INNER JOIN Users ON ModulePermission.LastModifiedByUserID = Users.UserID)
INNER JOIN Permission ON ModulePermission.PermissionID = Permission.PermissionID)
INNER JOIN Modules ON Modules.ModuleID = ModulePermission.ModuleID)
INNER JOIN ModuleDefinitions ON Modules.ModuleDefID = ModuleDefinitions.ModuleDefID)
INNER JOIN Roles ON ModulePermission.RoleID = Roles.RoleID)
Where Modules.ModuleID = %ModuleID%;
Replace %ModuleID%
with the ID of the module whose report is required.
The following table describes the output of the query mentioned above:
Output Columns |
Description |
DisplayName |
Name of the user who changed the module permission |
Email of the user that changed the module permission |
|
FriendlyName |
Friendly name of the Module |
PermissionID |
ID for permission that has been changed |
PermissionName |
Name of the permission that has been changed |
LastModifiedOnDate |
Date of last modification on the page |
RoleID |
ID for the role that has been changed |
RoleName |
Name for the role that has been changed (this indicates the role that has permissions to view the page) |
If you would like to review further user activity with similar detail as in the admin logs, you can query other tables as in Finding User Activity in DNN Tables.
Priyanka Bhotika
Comments