public static IList <string> BuildSecurityGroupNamesFromBusinessUnits(IList <Lookup> businessUnits) { var result = new List <string>(); result.Add(string.Concat(KTPConstants.Group_Prefix_Token, KTPConstants.Group_All_Records)); foreach (var division in businessUnits) { // Access to all recrods in specific Division result.Add(SecurityMatrixHelper.BuildDivisionLevelGroup(division.label.PrepString())); foreach (var stream in division.children) { // Access to all recrods in specific Division > Stream result.Add(SecurityMatrixHelper.BuildStreamLevelGroup(division.label.PrepString(), stream.label.PrepString())); foreach (var unit in stream.children) { // Access to all recrods in specific Division > Stream > Unit M & C result.Add(SecurityMatrixHelper.BuildUnitMnCLevelGroup(division.label.PrepString(), stream.label.PrepString(), unit.label.PrepString())); // Access to all recrods in specific Division > Stream > Unit L1 result.Add(SecurityMatrixHelper.BuildUnitL1LevelGroup(division.label.PrepString(), stream.label.PrepString(), unit.label.PrepString())); // Access to all recrods in specific Division > Stream > Unit L2 result.Add(SecurityMatrixHelper.BuildUnitL2LevelGroup(division.label.PrepString(), stream.label.PrepString(), unit.label.PrepString())); } } } return(result); }
public static string GetAllStreamRecordsGroupName(this Talent talent) { return(SecurityMatrixHelper.BuildStreamLevelGroup(talent.Division.PrepString(), talent.Stream.PrepString())); }