Пример #1
0
        public bool IsAppRunning( MvcContext ctx )
        {
            SiteAppService userAppService = new SiteAppService();
            IMemberApp app = userAppService.GetByApp( (IApp)ctx.app.obj );
            if (app == null || app.IsStop == 1)
                throw ctx.ex( HttpStatus.NotFound_404, lang.get( "exAppNotFound" ) );

            return app.IsStop == 0;
        }
Пример #2
0
        public static Boolean CanAppAdmin( IUser user, Type appType, int appInstanceId )
        {
            int roleId = ((User)user).RoleId;

            IMemberAppService siteAppService = new SiteAppService();
            IMemberApp app = siteAppService.GetByApp( appType, appInstanceId );

            return IsRoleInApp( roleId, app.Id );
        }
Пример #3
0
        public virtual bool IsAppRunning( MvcContext ctx )
        {
            SiteAppService userAppService = new SiteAppService();
            IMemberApp app = userAppService.GetByApp( (IApp)ctx.app.obj );
            if (app == null || app.IsStop == 1) {
                return false;
            }

            return true;
        }