Ejemplo n.º 1
0
        public IActionResult GroupDataApp(string groupid)
        {
            string userId = this.User.QID();

            if (userId == null)
            {
                return(null);
            }

            QuantApp.Kernel.User  user  = QuantApp.Kernel.User.FindUser(userId);
            QuantApp.Kernel.Group group = QuantApp.Kernel.Group.FindGroup(groupid);

            string profile = group.GetProperty("Profile");

            string        url       = group.Master.GetProperty("URL");
            List <object> jres_apps = new List <object>();

            object jres = null;

            AccessType ac = group.Permission(null, user);

            if (ac != AccessType.Denied)
            {
                jres = new
                {
                    ID          = group.ID,
                    Name        = group.Name,
                    Master      = group == group.Master,
                    Description = group.Description,
                    Profile     = profile,
                    URL         = url
                }
            }
            ;

            return(Ok(jres));
        }