Search This Blog

Monday, June 3, 2013

Protecting individual data fields by criteria

As you probably know, XAF comes with a built-in security module that provides ready-to-use solutions for protecting sensitive information on the table, row and field levels (check to learn more...).

I think you will be interested to know that the version 13.1 should bring an improvement in this regard - an advanced field-level protection mode that would allow you to secure individual fields rather than the whole data record by criteria (track this ticket...).

I just wanted to provide a quick update for XAF developers as we decided to keep this item Active for now, until more demos and complete documentation is available on this feature. Currently (in 13.1), we will only have a small demo in the SecurityDemo app for you to play:



You can see the configuration for this scenario in the Updater.cs file:

// Member By Criteria Operation Permissions
securityDemoRole.EnsureTypePermissions<MemberByCriteriaSecurityObject>(SecurityOperations.Navigate);
securityDemoRole.AddMemberAccessPermission<MemberByCriteriaSecurityObject>("Name", SecurityOperations.ReadWriteAccess, "[Name] <> 'No Read Access Object'");
securityDemoRole.AddMemberAccessPermission<MemberByCriteriaSecurityObject>("Property1;ReferenceProperty;Oid;oid", SecurityOperations.ReadWriteAccess, "[Name] = 'Fully Accessible Property Object'");

securityDemoRole.AddMemberAccessPermission<MemberByCriteriaSecurityObject>(
    "Property1;ReferenceProperty;Oid;oid", 
    SecurityOperations.Read, 
    "[Name] = 'Read-Only Property Object'"
);


We will officially announce this feature and mark the corresponding feature request as Closed once we are done with the learning materials. Please stay tuned!

No comments:

Post a Comment