Ejemplo n.º 1
0
        public object Reindex(string name)
        {
            TenantExtra.DemandControlPanelPermission();

            FactoryIndexer.Reindex(name);
            return(CheckSearchAvailable());
        }
Ejemplo n.º 2
0
        public string GetTempPath(string alias)
        {
            if (CoreContext.Configuration.Standalone)
            {
                TenantExtra.DemandControlPanelPermission();
            }

            return(backupHandler.GetTmpFolder());
        }
Ejemplo n.º 3
0
        [Read("getrestoreprogress", true, false)]  //NOTE: this method doesn't check payment!!!
        public BackupProgress GetRestoreProgress()
        {
            if (CoreContext.Configuration.Standalone)
            {
                TenantExtra.DemandControlPanelPermission();
            }

            return(backupHandler.GetRestoreProgress());
        }
Ejemplo n.º 4
0
        public BackupProgress StartBackupRestore(string backupId, BackupStorageType storageType, IEnumerable <ItemKeyValuePair <string, string> > storageParams, bool notify)
        {
            if (CoreContext.Configuration.Standalone)
            {
                TenantExtra.DemandControlPanelPermission();
            }

            return(backupHandler.StartRestore(backupId, storageType, storageParams.ToDictionary(r => r.Key, r => r.Value), notify));
        }
Ejemplo n.º 5
0
        public void DeleteBackupHistory()
        {
            if (CoreContext.Configuration.Standalone)
            {
                TenantExtra.DemandControlPanelPermission();
            }

            backupHandler.DeleteAllBackups();
        }
Ejemplo n.º 6
0
        public void DeleteBackup(Guid id)
        {
            if (CoreContext.Configuration.Standalone)
            {
                TenantExtra.DemandControlPanelPermission();
            }

            backupHandler.DeleteBackup(id);
        }
Ejemplo n.º 7
0
        public List <BackupHistoryRecord> GetBackupHistory()
        {
            if (CoreContext.Configuration.Standalone)
            {
                TenantExtra.DemandControlPanelPermission();
            }

            return(backupHandler.GetBackupHistory());
        }
Ejemplo n.º 8
0
        public BackupAjaxHandler.Schedule GetBackupSchedule()
        {
            if (CoreContext.Configuration.Standalone)
            {
                TenantExtra.DemandControlPanelPermission();
            }

            return(backupHandler.GetSchedule());
        }
Ejemplo n.º 9
0
        public void CreateBackupSchedule(BackupStorageType storageType, IEnumerable <ItemKeyValuePair <string, string> > storageParams, int backupsStored, BackupAjaxHandler.CronParams cronParams, bool backupMail)
        {
            if (CoreContext.Configuration.Standalone)
            {
                TenantExtra.DemandControlPanelPermission();
            }

            backupHandler.CreateSchedule(storageType, storageParams.ToDictionary(r => r.Key, r => r.Value), backupsStored, cronParams, backupMail);
        }
Ejemplo n.º 10
0
        public IEnumerable <object> GetSearchSettings()
        {
            TenantExtra.DemandControlPanelPermission();

            return(SearchSettings.GetAllItems().Select(r => new
            {
                id = r.ID,
                title = r.Title,
                enabled = r.Enabled
            }));
        }
Ejemplo n.º 11
0
        public void DeleteBackupSchedule()
        {
            if (CoreContext.Configuration.Standalone)
            {
                TenantExtra.DemandControlPanelPermission();
            }
            else
            {
                if (!TenantExtra.GetTenantQuota().AutoBackup)
                {
                    throw new SecurityException(Resource.ErrorAccessDenied);
                }
            }

            backupHandler.DeleteSchedule();
        }
Ejemplo n.º 12
0
        public void CreateBackupSchedule(BackupStorageType storageType, IEnumerable <ItemKeyValuePair <string, string> > storageParams, int backupsStored, BackupAjaxHandler.CronParams cronParams, bool backupMail)
        {
            if (CoreContext.Configuration.Standalone)
            {
                TenantExtra.DemandControlPanelPermission();
            }
            else
            {
                if (!TenantExtra.GetTenantQuota().AutoBackup)
                {
                    throw new SecurityException(Resource.ErrorNotAllowedOption);
                }
            }

            backupHandler.CreateSchedule(storageType, storageParams.ToDictionary(r => r.Key, r => r.Value), backupsStored, cronParams, backupMail);
        }
Ejemplo n.º 13
0
        public void SetSearchSettings(List <SearchSettingsItem> items)
        {
            TenantExtra.DemandControlPanelPermission();

            SearchSettings.Set(items);
        }
Ejemplo n.º 14
0
        public object CheckSearchAvailable()
        {
            TenantExtra.DemandControlPanelPermission();

            return(FactoryIndexer.GetState());
        }