예제 #1
0
        public override void Process( ProcessContext context )
        {
            MvcEventPublisher.Instance.BeginCheckLoginAction( context.ctx );
            if (context.ctx.utils.isSkipCurrentProcessor()) return;

            MethodInfo actionMethod = context.ctx.ActionMethodInfo; //  context.getActionMethod();
            Attribute loginAttr = context.getController().utils.getAttribute( actionMethod, typeof( LoginAttribute ) );

            if (loginAttr != null && context.IsUserLogin() == false) {
                context.ctx.controller.redirectLogin();
            }
        }
예제 #2
0
        public override void Process(ProcessContext context)
        {
            MvcEventPublisher.Instance.BeginCheckLoginAction(context.ctx);
            if (context.ctx.utils.isSkipCurrentProcessor())
            {
                return;
            }

            MethodInfo actionMethod = context.ctx.ActionMethodInfo; //  context.getActionMethod();
            Attribute  loginAttr    = context.getController().utils.getAttribute(actionMethod, typeof(LoginAttribute));

            if (loginAttr != null && context.IsUserLogin() == false)
            {
                context.ctx.controller.redirectLogin();
            }
        }