Skip to content

Commit

Permalink
Data Consent feature for DNN (#2683)
Browse files Browse the repository at this point in the history
* Add HasAgreedToTerms and HasAgreedToTermsOn to UserPortals and UserInfo. Add UserAgreedToTerms and ResetTermsAgreement methods to set these fields.

* Introduce new portal settings for GDPR management

* DB changes for GDPR

* Adding logic to controller and add logging

* Implement a fourth panel on the login screen to handle data consent

* Provide the redirect in case of a 3rd party solution

* Implementing a mechanism to anonymize users

* Add new SPROCS to uninstall script

* Add more fields to nullify when anonymizing a user

* Replace GDPR with DataConsent in code to avoid confusion

* Add user hard delete delay settings

* Added new scheduled task to remove users that are marked for deletion in portals where the DataConsent mechanism is active with Delayed Hard Delete of users

* Closing a couple of new methods from exposure to the public api

* Add two other mechanisms for deletion: off and manual. Remove anonymization as it is too risky for now.

* Moved sql to main 9.4.0 file upon request

* RequestsRemoval instead of DesiresRemoval

* Remove the logging of consent agreement
  • Loading branch information
donker authored and ohine committed Apr 12, 2019
1 parent d3d91b1 commit 9968677
Show file tree
Hide file tree
Showing 24 changed files with 2,045 additions and 1,057 deletions.
17 changes: 16 additions & 1 deletion DNN Platform/Library/Data/DataProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2384,6 +2384,11 @@ public virtual void RemoveUser(int userId, int portalId)
ExecuteNonQuery("RemoveUser", userId, GetNull(portalId));
}

public virtual void ResetTermsAgreement(int portalId)
{
ExecuteNonQuery("ResetTermsAgreement", portalId);
}

public virtual void RestoreUser(int userId, int portalId)
{
ExecuteNonQuery("RestoreUser", userId, GetNull(portalId));
Expand All @@ -2407,7 +2412,7 @@ public virtual void UpdateUser(int userId, int portalID, string firstName, strin
isApproved,
refreshRoles,
lastIpAddress,
passwordResetToken,
GetNull(passwordResetToken),
GetNull(passwordResetExpiration),
isDeleted,
lastModifiedByUserID);
Expand All @@ -2418,6 +2423,16 @@ public virtual void UpdateUserLastIpAddress(int userId, string lastIpAddress)
ExecuteNonQuery("UpdateUserLastIpAddress", userId, lastIpAddress);
}

public virtual void UserAgreedToTerms(int portalId, int userId)
{
ExecuteNonQuery("UserAgreedToTerms", portalId, userId);
}

public virtual void UserRequestsRemoval(int portalId, int userId, bool remove)
{
ExecuteNonQuery("UserRequestsRemoval", portalId, userId, remove);
}

#endregion

#region UserRole Methods
Expand Down
1 change: 1 addition & 0 deletions DNN Platform/Library/DotNetNuke.Library.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -1493,6 +1493,7 @@
<Compile Include="Services\UserProfile\UserProfilePicHandler.cs" />
<Compile Include="Services\UserRequest\IUserRequestIPAddressController.cs" />
<Compile Include="Services\UserRequest\UserRequestIPAddressController.cs" />
<Compile Include="Services\Users\PurgeDeletedUsers.cs" />
<Compile Include="Services\Zip\SharpZipLibRedirect.cs" />
<Compile Include="UI\Containers\ActionBase.cs">
<SubType>ASPXCodeBehind</SubType>
Expand Down
Loading

0 comments on commit 9968677

Please sign in to comment.