示例#1
0
            public EditorConfiguration(Configuration configuration)
            {
                _configuration = configuration;

                Customization = new CustomizationConfig(_configuration);

                Plugins = new PluginsConfig();

                Embedded  = new EmbeddedConfig();
                _userInfo = CoreContext.UserManager.GetUsers(SecurityContext.CurrentAccount.ID);

                if (!_userInfo.ID.Equals(ASC.Core.Configuration.Constants.Guest.ID))
                {
                    User = new UserConfig
                    {
                        Id   = _userInfo.ID.ToString(),
                        Name = _userInfo.DisplayUserName(false),
                    };
                }
            }
示例#2
0
        public EditorConfiguration(
            UserManager userManager,
            AuthContext authContext,
            DisplayUserSettingsHelper displayUserSettingsHelper,
            FilesLinkUtility filesLinkUtility,
            FileUtility fileUtility,
            BaseCommonLinkUtility baseCommonLinkUtility,
            PluginsConfig pluginsConfig,
            EmbeddedConfig embeddedConfig,
            CustomizationConfig <T> customizationConfig,
            FilesSettingsHelper filesSettingsHelper,
            IDaoFactory daoFactory,
            EntryManager entryManager)
        {
            UserManager           = userManager;
            AuthContext           = authContext;
            FilesLinkUtility      = filesLinkUtility;
            FileUtility           = fileUtility;
            BaseCommonLinkUtility = baseCommonLinkUtility;
            Customization         = customizationConfig;
            FilesSettingsHelper   = filesSettingsHelper;
            DaoFactory            = daoFactory;
            EntryManager          = entryManager;
            Plugins   = pluginsConfig;
            Embedded  = embeddedConfig;
            _userInfo = userManager.GetUsers(authContext.CurrentAccount.ID);

            if (!_userInfo.ID.Equals(ASC.Core.Configuration.Constants.Guest.ID))
            {
                User = new UserConfig
                {
                    Id   = _userInfo.ID.ToString(),
                    Name = _userInfo.DisplayUserName(false, displayUserSettingsHelper),
                };
            }
        }