Beispiel #1
0
 private bool isEndUserOrITC(InMemoryUser user)
 {
     if (user.HasProfile(ProfileType.Itc))
     {
         return(true);
     }
     return(user.PersonGroups.Any(f => f.PersonGroup.Name.EqualsAny(c.HEu, c.HExternalUser, c.HITC)));
 }
        private bool ShouldShowITC(InMemoryUser user)
        {
            var ctx = ContextLookuper.LookupContext();
            //to avoid null references...
            var module = ctx.Module ?? "";

            //var isFrThatHasNoAccess = module.EqualsAny(FunctionalRole.Tom.GetName(), FunctionalRole.Itom.GetName(),
            //    FunctionalRole.Sso.GetName());
            var isFrThatHasNoAccess = module.EqualsAny(FunctionalRole.Sso.GetName());

            if (isFrThatHasNoAccess)
            {
                return(false);
            }
            return(user.HasProfile(ProfileType.Itc) || module.EqualsAny(FunctionalRole.XItc.GetName(), FunctionalRole.Tom.GetName(), FunctionalRole.Itom.GetName()));
        }