I've created the Secure Policy for my Ms Sql Server database. And I'm trying to figure out a difference between BEFORE and AFTER dml operations. Also it would be great to know what is a reason to use it. I couldn't find any clear explenations of my topic.
CREATE SECURITY POLICY [Security].DealershipsCarsFilter
ADD FILTER PREDICATE [Security].fn_securitypredicate(DealershipId)
ON dbo.[DealershipsCars],
ADD BLOCK PREDICATE [Security].fn_securitypredicate(DealershipId)
ON dbo.[DealershipsCars] AFTER INSERT
WITH (STATE = ON);