예제 #1
0
        public ActionResult Index()
        {
            ViewBag.Message = "Grab your friends now!";
            TagCloud test;
            ComUsers com = new ComUsers();

            if (com.IsTokenValid(HttpContext))
            {
                test = com.GetPublicTagStats(4);
            }
            else
            {
                test = new TagCloud();
            }
            return(View(test));
        }
예제 #2
0
        protected override bool AuthorizeCore(HttpContextBase httpContext)
        {
            bool check = false;

            if (Types != null)
            {
                foreach (int i in Types)
                {
                    if (comUsers.IsAuthorized(httpContext, i))
                    {
                        check = true;
                    }
                }
            }
            else
            {
                check = comUsers.IsTokenValid(httpContext);
            }
            return(check);
        }