it seems if I want to use Rhino Security on an entity , that entity need to have a SecurityKey field of Guid type. I saw an example where the constructor of the entity's class has a statement that assign the SecurityKey
public class Document
{
public Document() { SecurityKey = Guid.NewGuid(); }
public virtual int Id {get; set;}
public virtual string Name { get; set;}
public virtual Guid SecurityKey { get; set;}
}
public class DocumentInformationExtractor : IEntityInformationExtractor
{ .... }
The constructor assgined a new Guid SecurityKey everytimes. I don't understand why this works. Should it not assgined a new Guid only for new entity that has not been persisted ?