private TestRowHolderByRole GetWithRoles()
        {
            ChildDisplayHelper.ReloadRoles();

            return(new TestRowHolderByRole
            {
                pub = ChildDisplayHelper.GetRows <Reac>(_id, new[] { SecurityRole.@public }),
                net = ChildDisplayHelper.GetRows <Reac>(_id, new[] { SecurityRole.network }),
                lim = ChildDisplayHelper.GetRows <Reac>(_id, new[] { SecurityRole.limited })
            });
        }
示例#2
0
        protected override void InternalGET(System.Web.HttpContext context, HandlerTimedCache cache)
        {
            var roles = UserHelper.GetUserRoles(context.User.Identity.Name);
            var id    = WebUtil.GetParam(context, "id", false);

            context.Response.Write(WebUtil.ObjectToJson(new
            {
                Reac         = ChildDisplayHelper.GetRows <Reac>(id, roles),
                Parcel       = ChildDisplayHelper.GetRows <Parcel>(id, roles),
                RealProperty = ChildDisplayHelper.GetRows <RealPropertyEvent>(id, roles),
                Subsidy      = ChildDisplayHelper.GetRows <Subsidy>(id, roles)
            }
                                                        ));
        }