コード例 #1
0
        /// <summary>
        /// Verifica se un utente è contenuto in un gruppo DCTM
        /// </summary>
        /// <param name="groupName"></param>
        /// <param name="userId"></param>
        /// <returns></returns>
        public bool ContainsGroupUser(string groupName, string userId)
        {
            IQueryService queryServices = DctmServiceFactory.GetServiceInstance <IQueryService>(UserManager.ImpersonateSuperUser());

            userId = DocsPaObjectTypes.TypeUtente.NormalizeUserName(userId);

            foreach (string user in Dfs4DocsPa.getUsersGroup(DocsPaObjectTypes.TypeGruppo.NormalizeGroupName(groupName), queryServices))
            {
                if (user == userId)
                {
                    return(true);
                }
            }

            return(false);
        }