IGroupReachableGroups Property |
Namespace: AskiaPortalCmn
This example looks if the group 2 is allowed to reach the group with id 5
using system; using AskiaPortalCmn; namespace MyApp { class Program { static void Main(string[] args) { var context = ContextFactory.CreateByLoginAndPassword("login", "secret"); var contextValidation = context.Validate(); if (!contextValidation.Success) { Console.Error.WriteLine("Invalid context"); Console.Error.Write(contextValidation.Exception.Message); return; } var group = GroupFactory.FindById(context, 2); // Is allowed to reach the group 5? if (group.ReachableGroups.Contains(5)) { Console.WriteLine("The group 2 can reach the group 5!"); } else { Console.WriteLine("The group 2 cannot reach the group 5!"); } } } }