+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Thunder Custom Module: Permissions and History

Thunder Custom Module: Permissions and History

1 posts, 0 answered
  1. Mikyle
    Mikyle avatar
    3 posts
    Registered:
    15 Mar 2016
    20 Oct
    Link to this post

    Sitefinity v. 9.1.6100.0

    Thunder v. 1.7.0.0

    I have built a custom module using Thunder's module builder. This module creates a back end page whose job is to provide UI to CRUD some objects.  

    HOWEVER, these objects live on a separate database and uses entity framework for CRUD. We just stripped out the DataAccess code, and replaced with entity framework code first.

    Other than this, the format of the module is essentially the same. KendoUI's elements drive the client side, the client side uses ajax to call a web service which was scaffolded by Thunder. 

    Is there an easy way to implement Permissions?

    Before any CUD operation, I want to check the roles of the user currently logged in and either allow or deny permission. I see Sitefinity provides a library for permissions. I could be wrong, but it seems as though this library would only work with the DataAccess orm. We cannot change ORMs.

    Is there an easy way to track changes on this entity?

    Upon update or delete of these objects, I want to store the previous version. I see that there is a VersionManager. However, I can't find any solid information online about how to use this class other than to delete versions. Can you link to some source code for how to properly CRUD a version for an object? How does version manager know which user made the changes?

    Thank you

1 posts, 0 answered