예제 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            LoadScripts();

            LoadControls();

            var mobileAppRegistrator = new CachedMobileAppInstallRegistrator(new MobileAppInstallRegistrator());
            var currentUser = CoreContext.UserManager.GetUsers(SecurityContext.CurrentAccount.ID);
            var isRegistered = mobileAppRegistrator.IsInstallRegistered(currentUser.Email, null);

            DisplayAppsBanner =
                SetupInfo.DisplayMobappBanner("files")
                && !CoreContext.Configuration.Standalone
                && !isRegistered;

            if (CoreContext.Configuration.Personal)
            {
                PersonalProcess();
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            MyProjects = RequestContext.CurrentUserProjects;

            InitControls();

            IsProjectAdmin = Page.Participant.IsAdmin;
            IsFullAdmin = Page.Participant.IsFullAdmin;
            IsOutsider = Page.Participant.UserInfo.IsOutsider();

            ParticipantSecurityInfo = new Dictionary<string, bool>
                                          {
                                              {"Project", IsProjectAdmin},
                                              {"Milestone", RequestContext.CanCreateMilestone()},
                                              {"Task", RequestContext.CanCreateTask()},
                                              {"Discussion", RequestContext.CanCreateDiscussion()},
                                              {"Time", RequestContext.CanCreateTime()},
                                              {"ProjectTemplate", IsProjectAdmin}
                                          };

            ShowCreateButton = (ParticipantSecurityInfo.Any(r => r.Value) || Page is TMDocs) && !Page.Participant.UserInfo.IsOutsider();


            var mobileAppRegistrator = new CachedMobileAppInstallRegistrator(new MobileAppInstallRegistrator());
            var currentUser = CoreContext.UserManager.GetUsers(SecurityContext.CurrentAccount.ID);
            var isRegistered = mobileAppRegistrator.IsInstallRegistered(currentUser.Email, null);

            DisplayAppsBanner =
                SetupInfo.DisplayMobappBanner("projects")
                && !CoreContext.Configuration.Standalone
                && !isRegistered;
        }