1
0
mirror of https://github.com/ONLYOFFICE/CommunityServer.git synced 2025-04-18 13:24:01 +03:00

Update to v12.5.2

This commit is contained in:
JenkinsRobo 2023-05-26 10:30:15 +00:00
parent b364013dff
commit ad790e8a87
4616 changed files with 89802 additions and 52328 deletions

Binary file not shown.

View File

@ -8,6 +8,10 @@ AjaxPro.2 - .NET Library that provides AJAX related methods to simplify the comm
License: MIT License
License File: AjaxPro.2.license
Amazon.Extensions.S3.Encryption - The Amazon S3 Encryption Client for .NET simplifies encrypting and decrypting objects to S3 using KMS or custom keys. (https://github.com/aws/amazon-s3-encryption-client-dotnet/blob/main/LICENSE)
License: Apache License 2.0
License File: Amazon.Extensions.S3.Encryption.license
AntiXSS - AntiXSS is an encoding library which uses a safe list approach to encoding. It provides Html, XML, Url, Form, LDAP, CSS, JScript and VBScript encoding methods to allow you to avoid Cross Site Scripting attacks. This library is part of the Microsoft SDL tools. (http://wpl.codeplex.com/license)
License: MS-PL License
License File: AntiXSS.license
@ -76,7 +80,7 @@ CommandLineParser - The Command Line Parser Library offers to CLR applications a
License: MIT License
License File: CommandLineParser.license
CsvHelper - A library for reading and writing CSV files. Extremely fast, flexible, and easy to use. Supports reading and writing of custom class objects. (https://licenses.nuget.org/MS-PL, или https://licenses.nuget.org/Apache-2.0)
CsvHelper - A library for reading and writing CSV files. Extremely fast, flexible, and easy to use. Supports reading and writing of custom class objects. (https://licenses.nuget.org/MS-PL, or https://licenses.nuget.org/Apache-2.0)
License: MS-PL or Apache License 2.0
License File: CsvHelper.license
@ -448,6 +452,10 @@ Pipelines.Sockets.Unofficial - Package Description (https://raw.githubuserconten
License: MIT License
License File: Pipelines.Sockets.Unofficial.license
Polly - Polly is a library that allows developers to express resilience and transient fault handling policies such as Retry, Circuit Breaker, Timeout, Bulkhead Isolation, and Fallback in a fluent and thread-safe manner. (https://github.com/App-vNext/Polly/blob/main/LICENSE.txt)
License: BSD-3-Clause "New" License
License File: Polly.license
Portable.BouncyCastle - BouncyCastle portable version with support for .NET 4, .NET Standard 2.0 (https://www.bouncycastle.org/csharp/licence.html)
License: MIT X11 License 
License File: Portable.BouncyCastle.license

View File

@ -1,389 +1,509 @@
# Change log
## Version 12.1.0
### General portal changes
* Fixed issue with processing mail messages containing a calendar event in the attachment (Bug #58533).
* Fixed issue with group filtering (Bug #58230).
* Fixed issue with loading of the currency convertor in CRM Opportunities (Bug #58651).
* Fixed issue with synchronizing between portal and mail client when grouping email chains (Bug #57194).
* Fixed issue with synchronizing between portal and mail client when filtering emails (Bug #57201).
* Fixed issue with Mail Services when installing on Ubuntu 22.04 (Bug #58608).
* Fixed issue with Redis and MySQL service dependencies in the systemd service files (Bug #58550).
* Fixed issue with functioning of the god service /etc/god/conf.d/services.god (Bug #58547).
* Fixed issue with installing on Ubuntu via Hetzner hosting (Bug #58609).
* Updated mysql-apt-config package (Bug #58374).
* Fixed issue with opening a document after successful 2FA authorization (Bug #58709).
* Fixed issue with sending notification emails about updates in the calendar event when changing it through the editing window (Bug #58726).
* Fixed issue with deleting a folder with several emails (Bug #58921).
* Fixed issue with unread/read emails when synchronizing between portal and mail client (Bug #57173).
* Fixed issue with installing a DEB package on Ubuntu 20.04 and Debian 10 (Bug #58920).
* Fixed SSL issues with WarmUp of Docker installations under https when restarting the container.
* API methods for changing email/password without mail activation added.
* The autocomplete="new-password" attribute is set in the password setting field when creating a user.
* Fixed displaying of the notification window for unactivated emails.
* Fixed Feed styles for mobile devices.
* API rebranding methods (for the default tenant) are available only to the administrator.
* Updated MySQL version to 8.0.30.
* Added mysql-apt-config update.
* Added automatic getting of the MySQL repository version.
* Corrected OCI for Ubuntu 22.04.
* Fixed restart confirmation for Ubuntu Jammy.
* Fixed and updated Node.js installation for Ubuntu Jammy.
* Fixed and updated MySQL installation for Ubuntu Jammy.
* Added always restart for Node.js/DotNet services.
* Removed restart of mail services by using the god service.
* Updated monoserve.service.
### Documents module
* Added push notifications for events related to folders and files. Subscription/unsubscription within mobile applications.
### Mail module
* Added functionality for receiving emails from custom folders and their synchronization with the Mail Server for ImapSync.
* Fixed issue with emails moved to the custom folder (Bug #58742).
* Fixed issue with synchronizing between portal and mail client when making changes in the client (Bug #55800).
* Fixed issue with lost email in the web when moving it to the custom folder in the synchronized email client (Bug #56745).
* Fixed issue marking an email as important when sending/receiving it from a custom mailbox (Bug #56932).
## Version 12.0.1
### General portal changes
* Fixed issue with deep linking.
* Fixed Migration feature.
* Storing indexing status as a list instead of a field for ElasticSearch API.
* Enhanced Backup service.
* Fixed unavailable Feed after data restoring (Bug #58135).
* Fixed invalid Fork me on GitHub button link in the Sample (Bug #57588).
* Portal users and guests are no more able to make the API SMTP settings request (Bug #57244).
* Fixed issue with displaying a new company name (after changing White Label settings) in the password change emails and other similar requests (Bug #56435).
* Personal user info is hidden from those who has no access to the People module (Bug #57851).
* A drop-down menu in the calendar added when clicking on a month/year (Bug #54767).
* Displaying an input cursor in the search bar when filtering with a drop-down list of users (Bug #57317).
### Server installations
* Removed storage_root parameter when starting Mail services.
* Fixed dotnet dependency installation.
* Fixed msttcore-fonts installation.
* Upgraded elasticsearch to version 7.16.3 in packages.
* Fixed memory allocation for elasticsearch.
* Fixed issue with config files after updating on Windows (Bug #50992).
* Fixed issue with security configs when making GET requests (Bug #57254).
* Fixed issue with mail services when installing on RedHat 8.6 and Centos 8 (Bug #57624).
### Documents module
* Changed frequency of displaying a hint page when opening a file in Private Room from the web version.
* Updated layout of the files list due to new Favorites icons.
* Restriction to open DOC files for editing on mobile devices (Bug #57373).
* Added new filtering parameters searchInContent and withSubfolders to API methods.
* Changed type of some API methods from GET to PUT/POST (Bug #57371).
* Users and their emails are not displayed in mentions if there isnt access to the People module (Bug #58037).
### Mail module
* Added On top button when zooming in empty folders (Bug #57671).
* Fixed issue with sending an email with a link to a non-editable file in the trial portal version (Bug #54637).
* Fixed DOCXF and OFORM icons when attaching files as a link (Bug #57657).
* Fixed issue with forwarding emails added to the Templates (Bug #57466).
* Fixed issue with filter settings (Bug #57200).
* Fixed issue with selecting emails as read/unread (Bug #57390).
* Fixed issue with the pop-up notification about a disabled account when printing out emails (Bug #57324).
* Fixed issue with re-opening of email signature settings (Bug #57322).
* Fixed issue with using the filter when selecting a date by custom period (Bug #57510).
* Fixed issue with downloading a file when clicking on the .docxf/.oform format link in Chrome (Bug #57651).
### People module
* Fixed Active connections check.
* Fixed issue with generating a CardDav book in case user emails contain capital letters (Bug #57831).
* Updated drop-down tooltip when setting a password (Bug #57673).
* Fixed issue with the https link in the invitation email when importing users (Bug #57519).
### Projects module
* Fixed issue with displaying the Time Tracking entry after its creation (Bug #57901)
* Fixed issue with closing CKEditor window after editing a task title (Bug #57625).
* Restriction of using XSS script in the milestone title (Bug #57559).
* Restriction of using XSS script in the Gantt Chart status (Bug #57256).
* Fixed issue with the incorrect link to the re-opened task in Telegram notifications (Bug #58107).
* Fixed issue with custom task status when re-opening it (Bug #57140).
* Administrator is automatically added to the project team when administrator assigns a task to themselves (Bug #57052).
* Fixed issue with filtering overdue milestones (Bug #57356).
* Fixed issue with filtering tasks when changing the Responsible: Me filter (Bug #57354).
* Fixed displaying of date format in Gantt Chart to match the format set on the portal (Bug #57370).
### CRM module
* Restriction of using XSS script in the Products & Services settings (Bug #57242).
* Fixed issue with the drop-down list in Invoices when page scrolling (Bug #57578).
* Removed Show total amount link for deals without a budget (Bug #57386).
### Calendar module
* Updated functionality of attaching files from the Documents module.
* Restriction to access events of other users using the historybyid.json method (Bug #58057).
* Fixed issue with unsubscribing from the event (Bug #58118).
* Restriction of using XSS script in To-do list (Bug #57307).
* Fixed issue with the doubled window in the mini-calendar when selecting a month/year (Bug #57480)
* Fixed issue with the CalDav link when the HTTPS certificate is activated (Bug #53265).
### Control Panel
* Fixed issue with brand logos after updating in the Docker installation (Bug #57331).
* Fixed issue with data import from Google Workspace in case the archive contains incorrect meta-information files (Bug #57617).
## Version 12.0.0
### General portal changes
* Added the ability to connect apps for authorization via AppleId and Microsoft.
* Changed keys for authorization via Twilio.
* Changed keys for authorization via bitly.
* Added the portal name in logs.
* Updated to CKEditor v4.16.1, added new styles for TextCut and Magicline.
* Edited bottom paddings in the layout.
* Redesigned Feed and Mail drop-down lists.
* Redesigned textarea for the Chrome browser.
* Added a new page with UserVisits information in ASC.Web.Stat.
* Disabled Community module by default for new portals.
* Updated default image for the authorization page.
* Default logo for the About page cannot be changed by an administrator via the WhiteLabel settings in the SaaS version.
* Fixed Telegram notifications and Zendesk chat.
* Portal name cannot be less than 3 characters.
* DotNetZip library replaced with ICSharpCode.SharpZipLib, AjaxMin library replaced with NUglify.
* Fixed the bug related with IP Security and Talk vulnerabilities.
* Removed the ASC.Mail.Autoreply project and service.
* Removed the log cleaner for NLog.
* Fixed the AjaxPro and BinaryFormatter vulnerabilities.
* Redesigned userselector, added avatars.
* Updated emails about changing email and password.
* Added a tip on security in the general settings for the server version.
* Duplicated password entry field.
* Fixed deprecated methods after updating jquery.
* In the DNS settings, a custom domain can be added via the request to support for the SaaS version.
* Added mentions in comments to tasks, email messages, discussions.
* Added support for deep link: when opening a document in a mobile browser, user can choose if the document should be opened in a browser or in a mobile app.
* Disabled asp.net sessions in the project.
### Documents module
* Added a new page when opening documents in the Private Room via a web browser.
* Updated empty files.
* Added new settings to automatically clean up the Trash folder.
* Added support of fb2 files for viewing.
* Added the ability to download xml files with conversion / open for viewing.
* Added the ability to download text files with conversion to epub, fb2, html, dotx, ott.
* Added the ability to download spreadsheets with conversion to xltx, ots.
* Added the ability to download presentations with conversion to potx, otp.
* Added the ability to download oxps files with conversion to pdf / open for viewing.
* Added the ability to download oxps files with conversion to pdf / open for viewing.
* Added the ability to download files with conversion to OOXML with macros (docm, dotm, xlsm, xltm, pptm, potm).
* When interacting with editors, a file type is processed in incoming requests and is added in outgoing requests.
* The default About window is displayed in editors in the SaaS version. The logo and advanced branding are transferred to the editors About window in the server version.
* Added a link to FAQ when connecting Yandex.
* Fixed the file selection area.
* Redesigned the Sharing settings window.
* Added a new feature in the Sharing settings window - Can't print, download and copy file (for Read Only and Comment).
* Added a new feature in the Sharing settings window - Can't change sharing settings (for Full Access).
* Added a new feature in Common settings - Default access rights in sharing settings.
* Added a new section in the Admin settings - Sharing settings.
* Hidden the Private Room section in the FileChoice, SaveAs dialogs.
* When converting files, regional settings are transferred.
* Added missing logs for actions with files and folders, added new api methods for actions.
* Added the ability to add folders to Favorites.
* Added support of WebDAV server.
### Calendar module
* Added WYSIWYG CKEditor in the Description field of the event.
* Connected a new config for the Toolbar.
* Redesigned the Description column for the List page.
* Added DOMPurify sanitizer to prevent possible XSS.
* Added the ability to attach local files and links to files from the Documents module to events.
### Projects module
* Added the ability to drag-and-drop subtasks.
* Reworked reports: User Activity, Project List, add a time interval.
### People module
* Added Telegram in Contact information.
* Moved Birthdays from Community to People.
* Added Birthdays and New employees to Feed.
* Added the connection list in the profile with the ability to log out.
* Added the ability for administrators to log out all connections of the certain user.
* Removed import from Yahoo.
* Added the ability to create CardDAV address books.
### Mail module
* Added IMAP synchronization for Mail Server.
* Added the ability to perform Mail Server database backup and restore.
* Added the ability to request a read receipt.
* Moved the Aggregator, StorageCleaner and Watchdog mail services from the .Net Framework platform to .NET 6.0.
### Control Panel
* Added the Data Import page that allows to import data from Nextcloud, ownCloud and GoogleWorkspace to ONLYOFFICE Workspace.
* Moved Elasticsearch to a separate container.
* Fixed bugs.
## Version 11.6.0
### Documents module
* Added the `.docxf` and `.oform` format definition. Own format icons are displayed.
* Added the ability to download `.docx` as `.docxf`. `.docxf` can be downloaded in the same formats as for `.docx` and in the `.oform` format.
* Added the ability to create an empty `.docxf` file and to create it on the base of an existing `.docx` file.
* Added the ability to create an `.oform` file from a `.docxf` file via the context menu.
* Added the ability to create an `.oform` file from a `.docxf` file from the editor specifying a folder.
* The ability to share a file with the Fill in the form permissions is only available for the `.oform` files. It's not possible to share encrypted files and files from third-party accounts for form filling. The Form Filling option is not available when sharing an `.oform` file via an external link.
* Added the Fill in the form icon in the file list to open an `.oform` file in the editor.
* If the `.oform` file is shared with the Form Filling rights, a copy of the file is created in the My documents section when a user opens the shared file. Filling in the form is performed in this copy and does not affect the original file. If the original file is changed by the owner, its copy will not be up-to-date.
* If the `.oform` file is shared with the Full Access rights, filling in the form is performed in the original file.
* Added sample `.docxf` and `.oform` files.
* For the editor dark theme, the usual logo is transferred so that it displays correctly in the embedded mode.
## Version 11.5.3
### General portal settings
* Added a dialog with the editors statistics on Payments page in Control Panel.
* Added a new slide to the start banner, added the Product Demo item to the Feedback & Support menu for trial SaaS portals.
* Added the Request training item to the Feedback & Support menu for paid portals (SaaS and Server versions).
* Added the Live Chat switcher to the Feedback & Support menu for paid portals (SaaS and Server versions).
* Added the Email support item to the Feedback & Support menu for paid portals (SaaS and Server versions).
## Version 11.5.2
### General portal settings
* ASC.Web.Studio: the `onlyoffice_logo` folder renamed to `logo`;
* Added a banner for the ONLYOFFICE Projects app in the App Store;
* Removed the button for downloading a paid invoice on the Payments page;
* Defining work from the Desktop on the server via userAgent (starting from version 6.1);
* Added the Zendesk chat display on the Payments page in the SaaS version;
* Updated the Payments page in the SaaS version. Prices are based on a number of users;
* Added the welcome dialog window for the portal owner on the main portal page;
* Removed the limitation on the amount of portal data when creating a backup;
* When storing backups to a third party service, chunk loading is now used;
* The Restore feature is available in the SaaS version if the pricing plan includes this option;
* Filter: a tip on the search is enabled in all modules, excep for People and Sample;
* Fixed calculating the total\current number of full-text search indexes;
* The full-text search feature is available in the SaaS version if the pricing plan includes this option;
* Updated ElasticSearch to the version 7.9;
* Reworked the receipt of data from the payment system for authorized requests in the SaaS version;
* The LDAP feature is available in the SaaS version if the pricing plan includes this option;
* Added the `temp` setting to specify a path for creating temporary files instead of the system `Path.GetTempFileName()` one;
* Changed email notifications for the SaaS version and messages about changing an email;
* Changed the assembly for archiving backup;
* Reworked the mechanism for working with resource files;
* All the available languages are enabled in the Personal cloud;
* The SSO feature is available in the SaaS version if the pricing plan includes this option. The `ssoauth service` moved from the control panel to portals;
* Updated the Yandex icons on the user profile page, authorization page and third party service connection settings;
* Added a checkpoint to the migration page and changed the email notification about the successful completion of the migration;
* Restored the mail migration functionality;
* Added the text about resetting users' passwords on the Restore settings page, added an email notification about the successful completion of the restoring process.
### Documents module
* Added Thumbnails view. Thumbnails are not generated for video. Thumbnails are not generated in third-party storages;
* Added the ability to select the archiving type in the settings: zip (by default) or tar.gz;
* Removed the support of the version 5.3 of the editors;
* Updated the Google Drive icons;
* Fixed calculating a quote when downloading several files in an archive;
* Removed transferring the anonymous name to the editor for using the renaming functionality in the versions 6.2, 6.3 of the editors;
* Added the ability to convert the fb2 files;
* Files can be shared with guests for viewing only;
* Removed the button to share a file with a group in the Private Room;
* Transferring the favorite status of a file to the version 6.3 of the editors;
* Signing in JWT the `callbackUrl` of the editor initialization configuration;
* Video and audio files are added to start samples in all languages;
* Archiving and compressing via tar.gz instead of zip when downloading several files;
* Removed the limitation on the size of files when downloading several files in an archive;
* The EasyBib and WordPress plugins are not available in the free version of the editors.
### CRM module
* Moved queue settings to the configuration. 2 streams are allocated for data export.
### Mail module
* Added the ability to get the connection settings for connecting a mailbox to third-party mail clients and the ability to change passwords for mailboxes created on the Mail Server in the SaaS version.
### Calendar
* Fixed bugs.
## Version 11.0
### General portal changes
* Added the ability to receive portal notifications via Telegram;
* Added the ability to make an addon (Mail, Chat, Calendar) a default portal page;
* Added the additional license check when replacing ONLYOFFICE in the About this program window;
* Added the vsyscall check to the installation scripts when installing Mail Server on Debian with kernel 4.18.0 and later;
* Updated copirights in the source files;
* Added the ability to connect the Mail.ru, VK and Yandex applications for authorization;
* Added new icons and texts in the welcome placeholders of the empty modules;
* Added icons to context menus;
* Added two scrolling areas on the page: navigation and content;
* Reworked the mechanics for displaying messages on the authorization page;
* Updated Elasticsearch to v.7.4. Added the possibility to rebuild the index.
* Updated Mono to v.6.8, updated builds, improved performance;
* Added the file encryption at rest feature for server versions;
* When requesting the password recovery, it's not possible to check if an email address is used on the portal;
* It is prohibited to specify the current password when changing a password;
* Updated minimal password length to 8 characters;
* The password complexity check is now performed in the client-side browser;
* Added password hashing with the PBKDF2 algorithm when transmitting passwords to the server;
* Added the Sign in to domain option on the authorization page for the portals where the LDAP Authentication is enabled;
* Added a request for subscription to newsletters in the free Community version installation wizard;
* Removed the link to the forum;
* Added data cleaning before restoring backup;
* When the license expires, Document Server updates are blocked in the installation;
* Portals with an expired license and Enterprise portals with a free default license are not blocked;
* In the free Community version, a block with a proposal to install Enterprise Edition is added;
* The Payment page redirects to the Control Panel (if it is installed);
* Added the `-it`, `--installation_type` parameter to the installation scripts. The possible values are `GROUPS | WORKSPACE | WORKSPACE_ENTERPRISE`.
### Documents module
* Changed the note about the mention in the comment pop-up window depending on the ability to provide access to the document;
* Added the support for the .webp images;
* Using a new MailMerge API for the editors;
* Opening the default portal page when clicking to the logo in the upper left corner of the editors interface;
* Added the ability to connect kDrive via WebDav;
* Added the Favorites section, added the ability to add files to favorites via context menu;
* Added the Recent section;
* Added translations for the EasyBib and WordPress plugins;
* Added the ability to provide the Custom Filter access rights for spreadsheets;
* Replaced an empty tab with a static page containing the logo when creating a new file;
* If the DocuSign service is not connected, the instructions are displayed when clicking the Sign with DocuSign context menu option;
* Added a new Private Room section;
* If an administrator disabled the Allow users to connect third-party storages option, they also cannot connect third-party clouds;
* Added a separate section for quick access to admin settings on the left panel;
* Added links to download desktop and mobile apps;
* Added empty files for creation in Japanese (ja-JP).
### CRM module
* Added the Make a VoIP call action in the contact context menu;
* Removed the unnecessary Quantity field when creating a new invoice item;
* Added the ability to enter decimal fractions with two decimal places in the Discount field when creating an invoice.
### Mail module
* Added a new scroll mechanism for the screen width greater than 1200 px.
### Calendar
* Improved the Calendar API security;
* Reworked the authorization method for the CalDAV calendars;
* Reworked the Radicale plugins for the new version 3.0.
# Change log
## Version 12.5.2
### General portal changes
* Fixed issue with Interface Theme and Contact Information arranging incorrectly upon reducing window width in People (Bug #62061).
* Fixed issue with an uploaded folder appearing only after reloading the page (Bug #61506).
* Fixed issue in CRM when address not appearing in the Invoice generated through the Invoice tab on the contact page (Bug #62050).
* Fixed issue in Calendar when an event from an attached ics file not synchronized via the CalDAV protocol (Bug #62048).
* Increased horizontal scroll in Desktop editors when connected to a portal (Bug #62153).
* Fixed issue with Show backup codes button would not working in People (Bug #62159).
* Fixed the inability to download a >5 MB file from an external access folder.
* Added translation of comments in source code into English.
* Fixed styles for Dark mode.
* Fixed styles for SSO.
* Refactoring of AutoCleanUp.
* Improvements for building server versions.
* Fixed dependency installation for python version 3.11 or later.
* Fixed moving backup file after backup to s3.
* Quota: fixed SetTenantQuotaRow function.
* Refactoring of DbManager.
### Documents module
* Added conversion of dps, dpt, et, ett, htm, mhtml, stw, sxc, sxi, sxw, wps, wpt, and xlsb files to supported formats.
## Version 12.5.1
### General portal changes
* Fixed issue with editors not opening (Error 500. Internal server error) when external sharing is disabled (Bug #61800).
* Fixed issue with 'Warning! Connection is lost' appearing error upon restoring version from editor while file is being edited (Bug #61772).
* Fixed issue when pressing Enter while creating an external link in the editor would also close the Sharing Setting window (Bug #61939).
* Fixed issue in Mail when the file selection window wouldn't expand when many folders are opened (Bug #61158).
* Fixed issue in Calendar when Invitations and cancellations are not sent for an event created in another calendar using a CalDAV link (Bug #48022).
* Fixed issue in Calendar when the Create button woudl not close after changing the year or month (Bug #59590).
* Fixed issue in CRM when a reset filter is reactivated on subsequent page transitions (Bug #54608).
* Added the ability in CRM to create a company to which another company is linked via the personList field (Bug #61715).
* Replaced the 'important' icon in a contact's history (Bug #61766).
* Fixed issue with updating a database with a missing stamp column (Bug #61838).
* Fixed issue with 'Error 500. Internal server error' when going to user's LDAP profile (Bug #61966).
* Fixed issue with infinite loading of files when creating them in a private room (Bug #61517).
* Fixed issue with incorrect width of text fields on the Settings > Integration > SSO (SaaS) page (Bug #61979).
* Fixed issue with Restore default settings action working incorrectly for LDAP Settings (SaaS) (Bug #49668).
* Fixed issue when synchronization with the LDAP server is enabled, the "+" sign is removed from the Primary Mobile Phone attribute in the user card (SaaS) (Bug #61986).
* Fixed issue with Dropdown menu styles in LDAP Settings > Auto Sync not adapted to dark theme (SaaS) (Bug #61974).
* Fixed issue with RabbitMQ not starting (Bug #1323).
* Fixed numerous issues for API documentation (Bugs #61734, #61735, #61737, #61740, #61742).
* Fixed issue with backup for s3: split large file uploads into pieces.
* User contact data template for telegram has been changed, now it is a http://t.me/{0} link with username substitution.
* Added redirect to the wrongportalname website page with the referer parameter (for correct operation when transferring the region from com to the co domain).
* Blocked display of user statistics until Quota is recalculated.
* Quota: added user recalculation by portal.
* Improvements for building server versions.
## Version 12.5.0
### General portal changes
* Logins and user actions can now be stored to syslog via nlog.
* Removed the unused 'department' column from the 'core_user' Sql table.
* Optimized backup.
* Removed the unused 'SendNoticeCallback' parameter.
* Updated nlog to v5.0.0.
* Added the ability to log in via SaslMechanismNtlm to SMTP settings.
* Added new icons for placeholder pages.
* Added the ability to set the number of login attempts, blocking time, and check period.
* Added the ability to set allowed IP addresses for users and admins separately in the IP Security setting. Added support for CIDR masking.
* Added API methods for changing email/password without email activation.
* Added the ability to set trusted IP addresses for which two-factor verification will not be performed, as well as to add users or groups for which two-factor verification will be performed. Added support for CIDR masking.
* Added the ability to add self-signed certificate for SSO, WebDAV.
* Optimized Feed operation.
* Changed settings for connecting third-party storages. Added tooltips for fields. Added the 'Server Side Encryption Method' block for Amazon AWS S3.
* Added Dark theme.
* Added logos for dark theme in the White Labeling section. Logos for the About page are now moved to the Control Panel.
* Added the new 'Lead' field to the team template.
* Added Impersonation Settings which allow the portal owner and full access administrators to log in to the portal on behalf of any user.
* Added the ability to set the password maximum length.
* Added the ability to set the memory quota for users.
* Added the ability to recalculate the space used by users.
* Added policies for working with third-party services, such as bar, helpcenter, moneyconverter. Policies unclude Retry policy, Timeout policy, Circuit policy.
### Documents module
* Added thumbnails adaptive layout.
* Improved conversion of password protected files.
* Add the ability to upload a structure of empty folders via drag-and-drop.
* Hidden Private Room in dialog windows for files/folders selection.
* Added empty file templates in Armenian, Basque, and Malay.
* Removed Wordpress, EasyBib from the Third-Party services settings.
* Fixed the issue when documents, spreadsheets, presentations created in Google Drive are not correctly recognized when opening on the portal.
* Errors are now displayed on the DeepLink page.
* Added the ability to create multiple external links to files and folders.
* Added the ability to set password protection for external links.
* Added the ability to set time limit for external links.
* Added the ability to insert data from a third-party source to a spreadsheet (compartible with Docs v.7.3).
* Common viewer is used instead of live viewer for anonymous users.
* Added the mobile view for the Sharing settings dialog window in the flat mode.
### Calendar module
* Moved scripts from the client to the .cs file.
### Mail module
* Changed the request type of the mail/filters/check API method from GET to POST.
* Added the ability to log in via SaslMechanismNtlm.
* Added the Drafts folder synchronization for ImapSync.
### CRM module
* Added the Angolan Kwanza (AOA) non-convertible currency.
* Added the Venezuelan Bolivar Soberano (VES) convertible currency.
### Control Panel
* Changed API methods for migration, implemented progressQueue.
* Changed settings for connecting third-party storages. Added tooltips for fields. Added the 'Server Side Encryption Method' block for Amazon AWS S3.
* Added logos for dark theme in the Branding section. Logos for the About page are now separate fields in the Advanced tab.
* Added the ability to set the portal memory quota.
## Version 12.1.0
### General portal changes
* Fixed issue with processing mail messages containing a calendar event in the attachment (Bug #58533).
* Fixed issue with group filtering (Bug #58230).
* Fixed issue with loading of the currency convertor in CRM Opportunities (Bug #58651).
* Fixed issue with synchronizing between portal and mail client when grouping email chains (Bug #57194).
* Fixed issue with synchronizing between portal and mail client when filtering emails (Bug #57201).
* Fixed issue with Mail Services when installing on Ubuntu 22.04 (Bug #58608).
* Fixed issue with Redis and MySQL service dependencies in the systemd service files (Bug #58550).
* Fixed issue with functioning of the god service /etc/god/conf.d/services.god (Bug #58547).
* Fixed issue with installing on Ubuntu via Hetzner hosting (Bug #58609).
* Updated mysql-apt-config package (Bug #58374).
* Fixed issue with opening a document after successful 2FA authorization (Bug #58709).
* Fixed issue with sending notification emails about updates in the calendar event when changing it through the editing window (Bug #58726).
* Fixed issue with deleting a folder with several emails (Bug #58921).
* Fixed issue with unread/read emails when synchronizing between portal and mail client (Bug #57173).
* Fixed issue with installing a DEB package on Ubuntu 20.04 and Debian 10 (Bug #58920).
* Fixed SSL issues with WarmUp of Docker installations under https when restarting the container.
* API methods for changing email/password without mail activation added.
* The autocomplete="new-password" attribute is set in the password setting field when creating a user.
* Fixed displaying of the notification window for unactivated emails.
* Fixed Feed styles for mobile devices.
* API rebranding methods (for the default tenant) are available only to the administrator.
* Updated MySQL version to 8.0.30.
* Added mysql-apt-config update.
* Added automatic getting of the MySQL repository version.
* Corrected OCI for Ubuntu 22.04.
* Fixed restart confirmation for Ubuntu Jammy.
* Fixed and updated Node.js installation for Ubuntu Jammy.
* Fixed and updated MySQL installation for Ubuntu Jammy.
* Added always restart for Node.js/DotNet services.
* Removed restart of mail services by using the god service.
* Updated monoserve.service.
### Documents module
* Added push notifications for events related to folders and files. Subscription/unsubscription within mobile applications.
### Mail module
* Added functionality for receiving emails from custom folders and their synchronization with the Mail Server for ImapSync.
* Fixed issue with emails moved to the custom folder (Bug #58742).
* Fixed issue with synchronizing between portal and mail client when making changes in the client (Bug #55800).
* Fixed issue with lost email in the web when moving it to the custom folder in the synchronized email client (Bug #56745).
* Fixed issue marking an email as important when sending/receiving it from a custom mailbox (Bug #56932).
## Version 12.0.1
### General portal changes
* Fixed issue with deep linking.
* Fixed Migration feature.
* Storing indexing status as a list instead of a field for ElasticSearch API.
* Enhanced Backup service.
* Fixed unavailable Feed after data restoring (Bug #58135).
* Fixed invalid Fork me on GitHub button link in the Sample (Bug #57588).
* Portal users and guests are no more able to make the API SMTP settings request (Bug #57244).
* Fixed issue with displaying a new company name (after changing White Label settings) in the password change emails and other similar requests (Bug #56435).
* Personal user info is hidden from those who has no access to the People module (Bug #57851).
* A drop-down menu in the calendar added when clicking on a month/year (Bug #54767).
* Displaying an input cursor in the search bar when filtering with a drop-down list of users (Bug #57317).
### Server installations
* Removed storage_root parameter when starting Mail services.
* Fixed dotnet dependency installation.
* Fixed msttcore-fonts installation.
* Upgraded elasticsearch to version 7.16.3 in packages.
* Fixed memory allocation for elasticsearch.
* Fixed issue with config files after updating on Windows (Bug #50992).
* Fixed issue with security configs when making GET requests (Bug #57254).
* Fixed issue with mail services when installing on RedHat 8.6 and Centos 8 (Bug #57624).
### Documents module
* Changed frequency of displaying a hint page when opening a file in Private Room from the web version.
* Updated layout of the files list due to new Favorites icons.
* Restriction to open DOC files for editing on mobile devices (Bug #57373).
* Added new filtering parameters searchInContent and withSubfolders to API methods.
* Changed type of some API methods from GET to PUT/POST (Bug #57371).
* Users and their emails are not displayed in mentions if there isnt access to the People module (Bug #58037).
### Mail module
* Added On top button when zooming in empty folders (Bug #57671).
* Fixed issue with sending an email with a link to a non-editable file in the trial portal version (Bug #54637).
* Fixed DOCXF and OFORM icons when attaching files as a link (Bug #57657).
* Fixed issue with forwarding emails added to the Templates (Bug #57466).
* Fixed issue with filter settings (Bug #57200).
* Fixed issue with selecting emails as read/unread (Bug #57390).
* Fixed issue with the pop-up notification about a disabled account when printing out emails (Bug #57324).
* Fixed issue with re-opening of email signature settings (Bug #57322).
* Fixed issue with using the filter when selecting a date by custom period (Bug #57510).
* Fixed issue with downloading a file when clicking on the .docxf/.oform format link in Chrome (Bug #57651).
### People module
* Fixed Active connections check.
* Fixed issue with generating a CardDav book in case user emails contain capital letters (Bug #57831).
* Updated drop-down tooltip when setting a password (Bug #57673).
* Fixed issue with the https link in the invitation email when importing users (Bug #57519).
### Projects module
* Fixed issue with displaying the Time Tracking entry after its creation (Bug #57901)
* Fixed issue with closing CKEditor window after editing a task title (Bug #57625).
* Restriction of using XSS script in the milestone title (Bug #57559).
* Restriction of using XSS script in the Gantt Chart status (Bug #57256).
* Fixed issue with the incorrect link to the re-opened task in Telegram notifications (Bug #58107).
* Fixed issue with custom task status when re-opening it (Bug #57140).
* Administrator is automatically added to the project team when administrator assigns a task to themselves (Bug #57052).
* Fixed issue with filtering overdue milestones (Bug #57356).
* Fixed issue with filtering tasks when changing the Responsible: Me filter (Bug #57354).
* Fixed displaying of date format in Gantt Chart to match the format set on the portal (Bug #57370).
### CRM module
* Restriction of using XSS script in the Products & Services settings (Bug #57242).
* Fixed issue with the drop-down list in Invoices when page scrolling (Bug #57578).
* Removed Show total amount link for deals without a budget (Bug #57386).
### Calendar module
* Updated functionality of attaching files from the Documents module.
* Restriction to access events of other users using the historybyid.json method (Bug #58057).
* Fixed issue with unsubscribing from the event (Bug #58118).
* Restriction of using XSS script in To-do list (Bug #57307).
* Fixed issue with the doubled window in the mini-calendar when selecting a month/year (Bug #57480)
* Fixed issue with the CalDav link when the HTTPS certificate is activated (Bug #53265).
### Control Panel
* Fixed issue with brand logos after updating in the Docker installation (Bug #57331).
* Fixed issue with data import from Google Workspace in case the archive contains incorrect meta-information files (Bug #57617).
## Version 12.0.0
### General portal changes
* Added the ability to connect apps for authorization via AppleId and Microsoft.
* Changed keys for authorization via Twilio.
* Changed keys for authorization via bitly.
* Added the portal name in logs.
* Updated to CKEditor v4.16.1, added new styles for TextCut and Magicline.
* Edited bottom paddings in the layout.
* Redesigned Feed and Mail drop-down lists.
* Redesigned textarea for the Chrome browser.
* Added a new page with UserVisits information in ASC.Web.Stat.
* Disabled Community module by default for new portals.
* Updated default image for the authorization page.
* Default logo for the About page cannot be changed by an administrator via the WhiteLabel settings in the SaaS version.
* Fixed Telegram notifications and Zendesk chat.
* Portal name cannot be less than 3 characters.
* DotNetZip library replaced with ICSharpCode.SharpZipLib, AjaxMin library replaced with NUglify.
* Fixed the bug related with IP Security and Talk vulnerabilities.
* Removed the ASC.Mail.Autoreply project and service.
* Removed the log cleaner for NLog.
* Fixed the AjaxPro and BinaryFormatter vulnerabilities.
* Redesigned userselector, added avatars.
* Updated emails about changing email and password.
* Added a tip on security in the general settings for the server version.
* Duplicated password entry field.
* Fixed deprecated methods after updating jquery.
* In the DNS settings, a custom domain can be added via the request to support for the SaaS version.
* Added mentions in comments to tasks, email messages, discussions.
* Added support for deep link: when opening a document in a mobile browser, user can choose if the document should be opened in a browser or in a mobile app.
* Disabled asp.net sessions in the project.
### Documents module
* Added a new page when opening documents in the Private Room via a web browser.
* Updated empty files.
* Added new settings to automatically clean up the Trash folder.
* Added support of fb2 files for viewing.
* Added the ability to download xml files with conversion / open for viewing.
* Added the ability to download text files with conversion to epub, fb2, html, dotx, ott.
* Added the ability to download spreadsheets with conversion to xltx, ots.
* Added the ability to download presentations with conversion to potx, otp.
* Added the ability to download oxps files with conversion to pdf / open for viewing.
* Added the ability to download oxps files with conversion to pdf / open for viewing.
* Added the ability to download files with conversion to OOXML with macros (docm, dotm, xlsm, xltm, pptm, potm).
* When interacting with editors, a file type is processed in incoming requests and is added in outgoing requests.
* The default About window is displayed in editors in the SaaS version. The logo and advanced branding are transferred to the editors About window in the server version.
* Added a link to FAQ when connecting Yandex.
* Fixed the file selection area.
* Redesigned the Sharing settings window.
* Added a new feature in the Sharing settings window - Can't print, download and copy file (for Read Only and Comment).
* Added a new feature in the Sharing settings window - Can't change sharing settings (for Full Access).
* Added a new feature in Common settings - Default access rights in sharing settings.
* Added a new section in the Admin settings - Sharing settings.
* Hidden the Private Room section in the FileChoice, SaveAs dialogs.
* When converting files, regional settings are transferred.
* Added missing logs for actions with files and folders, added new api methods for actions.
* Added the ability to add folders to Favorites.
* Added support of WebDAV server.
### Calendar module
* Added WYSIWYG CKEditor in the Description field of the event.
* Connected a new config for the Toolbar.
* Redesigned the Description column for the List page.
* Added DOMPurify sanitizer to prevent possible XSS.
* Added the ability to attach local files and links to files from the Documents module to events.
### Projects module
* Added the ability to drag-and-drop subtasks.
* Reworked reports: User Activity, Project List, add a time interval.
### People module
* Added Telegram in Contact information.
* Moved Birthdays from Community to People.
* Added Birthdays and New employees to Feed.
* Added the connection list in the profile with the ability to log out.
* Added the ability for administrators to log out all connections of the certain user.
* Removed import from Yahoo.
* Added the ability to create CardDAV address books.
### Mail module
* Added IMAP synchronization for Mail Server.
* Added the ability to perform Mail Server database backup and restore.
* Added the ability to request a read receipt.
* Moved the Aggregator, StorageCleaner and Watchdog mail services from the .Net Framework platform to .NET 6.0.
### Control Panel
* Added the Data Import page that allows to import data from Nextcloud, ownCloud and GoogleWorkspace to ONLYOFFICE Workspace.
* Moved Elasticsearch to a separate container.
* Fixed bugs.
## Version 11.6.0
### Documents module
* Added the `.docxf` and `.oform` format definition. Own format icons are displayed.
* Added the ability to download `.docx` as `.docxf`. `.docxf` can be downloaded in the same formats as for `.docx` and in the `.oform` format.
* Added the ability to create an empty `.docxf` file and to create it on the base of an existing `.docx` file.
* Added the ability to create an `.oform` file from a `.docxf` file via the context menu.
* Added the ability to create an `.oform` file from a `.docxf` file from the editor specifying a folder.
* The ability to share a file with the Fill in the form permissions is only available for the `.oform` files. It's not possible to share encrypted files and files from third-party accounts for form filling. The Form Filling option is not available when sharing an `.oform` file via an external link.
* Added the Fill in the form icon in the file list to open an `.oform` file in the editor.
* If the `.oform` file is shared with the Form Filling rights, a copy of the file is created in the My documents section when a user opens the shared file. Filling in the form is performed in this copy and does not affect the original file. If the original file is changed by the owner, its copy will not be up-to-date.
* If the `.oform` file is shared with the Full Access rights, filling in the form is performed in the original file.
* Added sample `.docxf` and `.oform` files.
* For the editor dark theme, the usual logo is transferred so that it displays correctly in the embedded mode.
## Version 11.5.3
### General portal settings
* Added a dialog with the editors statistics on Payments page in Control Panel.
* Added a new slide to the start banner, added the Product Demo item to the Feedback & Support menu for trial SaaS portals.
* Added the Request training item to the Feedback & Support menu for paid portals (SaaS and Server versions).
* Added the Live Chat switcher to the Feedback & Support menu for paid portals (SaaS and Server versions).
* Added the Email support item to the Feedback & Support menu for paid portals (SaaS and Server versions).
## Version 11.5.2
### General portal settings
* ASC.Web.Studio: the `onlyoffice_logo` folder renamed to `logo`;
* Added a banner for the ONLYOFFICE Projects app in the App Store;
* Removed the button for downloading a paid invoice on the Payments page;
* Defining work from the Desktop on the server via userAgent (starting from version 6.1);
* Added the Zendesk chat display on the Payments page in the SaaS version;
* Updated the Payments page in the SaaS version. Prices are based on a number of users;
* Added the welcome dialog window for the portal owner on the main portal page;
* Removed the limitation on the amount of portal data when creating a backup;
* When storing backups to a third party service, chunk loading is now used;
* The Restore feature is available in the SaaS version if the pricing plan includes this option;
* Filter: a tip on the search is enabled in all modules, excep for People and Sample;
* Fixed calculating the total\current number of full-text search indexes;
* The full-text search feature is available in the SaaS version if the pricing plan includes this option;
* Updated ElasticSearch to the version 7.9;
* Reworked the receipt of data from the payment system for authorized requests in the SaaS version;
* The LDAP feature is available in the SaaS version if the pricing plan includes this option;
* Added the `temp` setting to specify a path for creating temporary files instead of the system `Path.GetTempFileName()` one;
* Changed email notifications for the SaaS version and messages about changing an email;
* Changed the assembly for archiving backup;
* Reworked the mechanism for working with resource files;
* All the available languages are enabled in the Personal cloud;
* The SSO feature is available in the SaaS version if the pricing plan includes this option. The `ssoauth service` moved from the control panel to portals;
* Updated the Yandex icons on the user profile page, authorization page and third party service connection settings;
* Added a checkpoint to the migration page and changed the email notification about the successful completion of the migration;
* Restored the mail migration functionality;
* Added the text about resetting users' passwords on the Restore settings page, added an email notification about the successful completion of the restoring process.
### Documents module
* Added Thumbnails view. Thumbnails are not generated for video. Thumbnails are not generated in third-party storages;
* Added the ability to select the archiving type in the settings: zip (by default) or tar.gz;
* Removed the support of the version 5.3 of the editors;
* Updated the Google Drive icons;
* Fixed calculating a quote when downloading several files in an archive;
* Removed transferring the anonymous name to the editor for using the renaming functionality in the versions 6.2, 6.3 of the editors;
* Added the ability to convert the fb2 files;
* Files can be shared with guests for viewing only;
* Removed the button to share a file with a group in the Private Room;
* Transferring the favorite status of a file to the version 6.3 of the editors;
* Signing in JWT the `callbackUrl` of the editor initialization configuration;
* Video and audio files are added to start samples in all languages;
* Archiving and compressing via tar.gz instead of zip when downloading several files;
* Removed the limitation on the size of files when downloading several files in an archive;
* The EasyBib and WordPress plugins are not available in the free version of the editors.
### CRM module
* Moved queue settings to the configuration. 2 streams are allocated for data export.
### Mail module
* Added the ability to get the connection settings for connecting a mailbox to third-party mail clients and the ability to change passwords for mailboxes created on the Mail Server in the SaaS version.
### Calendar
* Fixed bugs.
## Version 11.0
### General portal changes
* Added the ability to receive portal notifications via Telegram;
* Added the ability to make an addon (Mail, Chat, Calendar) a default portal page;
* Added the additional license check when replacing ONLYOFFICE in the About this program window;
* Added the vsyscall check to the installation scripts when installing Mail Server on Debian with kernel 4.18.0 and later;
* Updated copirights in the source files;
* Added the ability to connect the Mail.ru, VK and Yandex applications for authorization;
* Added new icons and texts in the welcome placeholders of the empty modules;
* Added icons to context menus;
* Added two scrolling areas on the page: navigation and content;
* Reworked the mechanics for displaying messages on the authorization page;
* Updated Elasticsearch to v.7.4. Added the possibility to rebuild the index.
* Updated Mono to v.6.8, updated builds, improved performance;
* Added the file encryption at rest feature for server versions;
* When requesting the password recovery, it's not possible to check if an email address is used on the portal;
* It is prohibited to specify the current password when changing a password;
* Updated minimal password length to 8 characters;
* The password complexity check is now performed in the client-side browser;
* Added password hashing with the PBKDF2 algorithm when transmitting passwords to the server;
* Added the Sign in to domain option on the authorization page for the portals where the LDAP Authentication is enabled;
* Added a request for subscription to newsletters in the free Community version installation wizard;
* Removed the link to the forum;
* Added data cleaning before restoring backup;
* When the license expires, Document Server updates are blocked in the installation;
* Portals with an expired license and Enterprise portals with a free default license are not blocked;
* In the free Community version, a block with a proposal to install Enterprise Edition is added;
* The Payment page redirects to the Control Panel (if it is installed);
* Added the `-it`, `--installation_type` parameter to the installation scripts. The possible values are `GROUPS | WORKSPACE | WORKSPACE_ENTERPRISE`.
### Documents module
* Changed the note about the mention in the comment pop-up window depending on the ability to provide access to the document;
* Added the support for the .webp images;
* Using a new MailMerge API for the editors;
* Opening the default portal page when clicking to the logo in the upper left corner of the editors interface;
* Added the ability to connect kDrive via WebDav;
* Added the Favorites section, added the ability to add files to favorites via context menu;
* Added the Recent section;
* Added translations for the EasyBib and WordPress plugins;
* Added the ability to provide the Custom Filter access rights for spreadsheets;
* Replaced an empty tab with a static page containing the logo when creating a new file;
* If the DocuSign service is not connected, the instructions are displayed when clicking the Sign with DocuSign context menu option;
* Added a new Private Room section;
* If an administrator disabled the Allow users to connect third-party storages option, they also cannot connect third-party clouds;
* Added a separate section for quick access to admin settings on the left panel;
* Added links to download desktop and mobile apps;
* Added empty files for creation in Japanese (ja-JP).
### CRM module
* Added the Make a VoIP call action in the contact context menu;
* Removed the unnecessary Quantity field when creating a new invoice item;
* Added the ability to enter decimal fractions with two decimal places in the Discount field when creating an invoice.
### Mail module
* Added a new scroll mechanism for the screen width greater than 1200 px.
### Calendar
* Improved the Calendar API security;
* Reworked the authorization method for the CalDAV calendars;
* Reworked the Radicale plugins for the new version 3.0.

View File

@ -17,39 +17,34 @@ if "%~1" == "--install-all" (
sc create OnlyofficeNotify%version% start= delayed-auto binPath= "\"%basepath%\TeamLabSvc.exe\" --service \"ASC.Notify.NotifyServiceLauncher, ASC.Notify\" --log Notify"
sc create OnlyofficeJabber%version% start= delayed-auto binPath= "\"%grandparent%\Jabber\ASC.Xmpp.Server.Launcher.exe\""
sc create OnlyofficeIndex%version% start= delayed-auto binPath= "\"%basepath%\TeamLabSvc.exe\" --service \"ASC.ElasticSearch.Launcher, ASC.ElasticSearch\" --log Index"
sc create OnlyofficeRadicale%version% start= delayed-auto binPath= "\"%basepath%\TeamLabSvc.exe\" --service \"ASC.Radicale.Launcher, ASC.Radicale\" --log Radicale"
sc create OnlyOfficeStorageMigrate%version% start= delayed-auto binPath= "\"%basepath%\TeamLabSvc.exe\" --service \"ASC.Data.Storage.Migration.Launcher,ASC.Data.Storage.Migration\" --log StorageMigrate"
sc create OnlyOfficeStorageEncryption%version% start= delayed-auto binPath= "\"%basepath%\TeamLabSvc.exe\" --service \"ASC.Data.Storage.Encryption.Launcher,ASC.Data.Storage.Encryption\" --log StorageEncryption"
sc create OnlyofficeFeed%version% start= delayed-auto binPath= "\"%basepath%\TeamLabSvc.exe\" --service \"ASC.Feed.Aggregator.FeedAggregatorLauncher, ASC.Feed.Aggregator\" --log Feed"
sc create OnlyOfficeAutoCleanUp%version% start= delayed-auto binPath= "\"%basepath%\TeamLabSvc.exe\" --service \"ASC.Files.AutoCleanUp.Launcher, ASC.Files.AutoCleanUp\" --log AutoCleanUp"
sc create OnlyofficeBackup%version% start= delayed-auto binPath= "\"%basepath%\TeamLabSvc.exe\" --service \"ASC.Data.Backup.Service.BackupServiceLauncher, ASC.Data.Backup\" --log Backup"
sc create OnlyOfficeSocketIO%version% start= delayed-auto binPath= "\"%basepath%\TeamLabSvc.exe\" --service \"ASC.Socket.IO.Svc.Launcher, ASC.Socket.IO.Svc\" --log SocketIO"
sc create OnlyOfficeTelegram%version% start= delayed-auto binPath= "\"%basepath%\TeamLabSvc.exe\" --service \"ASC.TelegramService.Launcher, ASC.TelegramService\" --log Telegram"
sc create OnlyofficeThumbnailBuilder%version% start= delayed-auto binPath= "\"%basepath%\TeamLabSvc.exe\" --service \"ASC.Files.ThumbnailBuilder.Launcher, ASC.Files.ThumbnailBuilder\" --log ThumbnailBuilder"
sc create OnlyOfficeThumb%version% start= delayed-auto binPath= "\"%basepath%\TeamLabSvc.exe\" --service \"ASC.Thumbnails.Svc.Launcher,ASC.Thumbnails.Svc\" --log Thumb"
sc create OnlyOfficeSsoAuth%version% start= delayed-auto binPath= "\"%basepath%\TeamLabSvc.exe\" --service \"ASC.SsoAuth.Svc.Launcher,ASC.SsoAuth.Svc\" --log SsoAuth"
sc create OnlyOfficeUrlShortener%version% start= delayed-auto binPath= "\"%basepath%\TeamLabSvc.exe\" --service \"ASC.UrlShortener.Svc.Launcher,ASC.UrlShortener.Svc\" --log UrlShortener"
sc create OnlyOfficeWebDav%version% start= delayed-auto binPath= "\"%basepath%\TeamLabSvc.exe\" --service \"ASC.WebDav.Svc.Launcher,ASC.WebDav.Svc\" --log WebDav"
sc create OnlyOfficeMailAggregator%version% start= delayed-auto binPath= "\"%grandparent%\MailAggregator\ASC.Mail.Aggregator.CollectionService.exe\""
sc create OnlyOfficeMailWatchdog%version% start= delayed-auto binPath= "\"%grandparent%\MailWatchdog\ASC.Mail.Watchdog.Service.exe\""
sc create OnlyOfficeMailCleaner%version% start= delayed-auto binPath= "\"%grandparent%\MailCleaner\ASC.Mail.StorageCleaner.exe\""
call %basepath%\WinSW3.0.0.exe install %grandparent%\run\Radicale.xml
call %basepath%\WinSW3.0.0.exe install %grandparent%\run\SsoAuth.xml
call %basepath%\WinSW3.0.0.exe install %grandparent%\run\SocketIO.xml
call %basepath%\WinSW3.0.0.exe install %grandparent%\run\WebDav.xml
call %basepath%\WinSW3.0.0.exe install %grandparent%\run\UrlShortener.xml
call %basepath%\WinSW3.0.0.exe install %grandparent%\run\Thumb.xml
sc failure OnlyofficeNotify%version% reset= 60 actions= restart/60000/restart/60000/restart/60000
sc failure OnlyofficeJabber%version% reset= 60 actions= restart/60000/restart/60000/restart/60000
sc failure OnlyofficeIndex%version% reset= 60 actions= restart/60000/restart/60000/restart/60000
sc failure OnlyofficeRadicale%version% reset= 60 actions= restart/60000/restart/60000/restart/60000
sc failure OnlyOfficeStorageMigrate%version% reset= 60 actions= restart/60000/restart/60000/restart/60000
sc failure OnlyOfficeStorageEncryption%version% reset= 60 actions= restart/60000/restart/60000/restart/60000
sc failure OnlyofficeAutoCleanUp%version% reset= 60 actions= restart/60000/restart/60000/restart/60000
sc failure OnlyofficeFeed%version% reset= 60 actions= restart/60000/restart/60000/restart/60000
sc failure OnlyofficeBackup%version% reset= 60 actions= restart/60000/restart/60000/restart/60000
sc failure OnlyOfficeSocketIO%version% reset= 60 actions= restart/60000/restart/60000/restart/60000
sc failure OnlyOfficeTelegram%version% reset= 60 actions= restart/60000/restart/60000/restart/60000
sc failure OnlyofficeThumbnailBuilder%version% reset= 60 actions= restart/60000/restart/60000/restart/60000
sc failure OnlyOfficeThumb%version% reset= 60 actions= restart/60000/restart/60000/restart/60000
sc failure OnlyOfficeSsoAuth%version% reset= 60 actions= restart/60000/restart/60000/restart/60000
sc failure OnlyOfficeUrlShortener%version% reset= 60 actions= restart/60000/restart/60000/restart/60000
sc failure OnlyOfficeWebDav%version% reset= 60 actions= restart/60000/restart/60000/restart/60000
sc failure OnlyOfficeMailAggregator%version% reset= 60 actions= restart/60000/restart/60000/restart/60000
sc failure OnlyOfficeMailWatchdog%version% reset= 60 actions= restart/60000/restart/60000/restart/60000
sc failure OnlyOfficeMailCleaner%version% reset= 60 actions= restart/60000/restart/60000/restart/60000
@ -69,8 +64,6 @@ if "%~1" == "--uninstall-all" (
sc delete OnlyofficeJabber%version%
net stop OnlyofficeIndex%version%
sc delete OnlyofficeIndex%version%
net stop OnlyofficeRadicale%version%
sc delete OnlyofficeRadicale%version%
net stop OnlyOfficeStorageMigrate%version%
sc delete OnlyOfficeStorageMigrate%version%
net stop OnlyOfficeStorageEncryption%version%
@ -81,18 +74,8 @@ if "%~1" == "--uninstall-all" (
sc delete OnlyofficeFeed%version%
net stop OnlyofficeBackup%version%
sc delete OnlyofficeBackup%version%
net stop OnlyOfficeSocketIO%version%
sc delete OnlyOfficeSocketIO%version%
net stop OnlyOfficeTelegram%version%
sc delete OnlyOfficeTelegram%version%
net stop OnlyOfficeThumb%version%
sc delete OnlyOfficeThumb%version%
net stop OnlyOfficeSsoAuth%version%
sc delete OnlyOfficeSsoAuth%version%
net stop OnlyOfficeUrlShortener%version%
sc delete OnlyOfficeUrlShortener%version%
net stop OnlyOfficeWebDav%version%
sc delete OnlyOfficeWebDav%version%
sc delete OnlyOfficeTelegram%version%
net stop OnlyofficeThumbnailBuilder%version%
sc delete OnlyofficeThumbnailBuilder%version%
net stop OnlyOfficeMailAggregator%version%
@ -102,6 +85,19 @@ if "%~1" == "--uninstall-all" (
net stop OnlyOfficeMailCleaner%version%
sc delete OnlyOfficeMailCleaner%version%
call %basepath%\WinSW3.0.0.exe stop %grandparent%\run\Radicale.xml
call %basepath%\WinSW3.0.0.exe uninstall %grandparent%\run\Radicale.xml
call %basepath%\WinSW3.0.0.exe stop %grandparent%\run\SsoAuth.xml
call %basepath%\WinSW3.0.0.exe uninstall %grandparent%\run\SsoAuth.xml
call %basepath%\WinSW3.0.0.exe stop %grandparent%\run\SocketIO.xml
call %basepath%\WinSW3.0.0.exe uninstall %grandparent%\run\SocketIO.xml
call %basepath%\WinSW3.0.0.exe stop %grandparent%\run\WebDav.xml
call %basepath%\WinSW3.0.0.exe uninstall %grandparent%\run\WebDav.xml
call %basepath%\WinSW3.0.0.exe stop %grandparent%\run\UrlShortener.xml
call %basepath%\WinSW3.0.0.exe uninstall %grandparent%\run\UrlShortener.xml
call %basepath%\WinSW3.0.0.exe stop %grandparent%\run\Thumb.xml
call %basepath%\WinSW3.0.0.exe uninstall %grandparent%\run\Thumb.xml
goto Exit
)

View File

@ -9,12 +9,6 @@
<section name="backup" type="ASC.Data.Backup.Service.BackupConfigurationSection, ASC.Data.Backup" />
<section name="feed" type="ASC.Feed.Aggregator.Config.FeedConfigurationSection, ASC.Feed.Aggregator" />
<section name="healthCheck" type="ASC.HealthCheck.Settings.HealthCheckCfgSectionHandler, ASC.HealthCheck" />
<section name="socketio" type="ASC.Socket.IO.Svc.SocketIOCfgSectionHandler, ASC.Socket.IO.Svc" />
<section name="thumb" type="ASC.Thumbnails.Svc.ConfigHandler, ASC.Thumbnails.Svc" />
<section name="ssoauth" type="ASC.SsoAuth.Svc.ConfigHandler, ASC.SsoAuth.Svc" />
<section name="urlshortener" type="ASC.UrlShortener.Svc.ConfigHandler, ASC.UrlShortener.Svc" />
<section name="webdav" type="ASC.WebDav.Svc.ConfigHandler, ASC.WebDav.Svc" />
<section name="radicale" type="ASC.Radicale.RadicaleCfgSectionHandler, ASC.Radicale" />
<section name="apiClient" type="ASC.Api.Client.ApiClientConfiguration, ASC.Api.Client" />
<section name="autofac" type="ASC.Common.DependencyInjection.AutofacConfigurationSection, ASC.Common" />
<section name="consumers" type="ASC.Core.Common.Configuration.ConsumerConfigurationSection, ASC.Core.Common" />
@ -30,7 +24,7 @@
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="BouncyCastle.Crypto" culture="neutral" publicKeyToken="0e99375e54769942" />
<bindingRedirect oldVersion="0.0.0.0-1.8.10.0" newVersion="1.8.10.0" />
<bindingRedirect oldVersion="0.0.0.0-1.9.0.0" newVersion="1.9.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Google.Apis" culture="neutral" publicKeyToken="4b01fa6e34db77ab" />
@ -132,6 +126,7 @@
<add key="core.base-domain" value="localhost" />
<add key="core.machinekey" value="Vskoproizvolny Salt par Chivreski" />
<add key="core.payment-region" value="test" />
<add key="core.self-signed-cert-path" value="" />
<add key="files.docservice.secret" value="" />
<add key="files.docservice.secret.header" value="" />
<add key="files.docservice.timeout" value="50000" />
@ -146,6 +141,7 @@
<add key="web.controlpanel.url" value="" />
<add key="ping.url" value="http://localhost" />
<add key="ping.interval" value="10000" />
<add key="files.uploader.chunk-size" value="20971520" />
<add key="license.file.path" value="" />
<add key="resources.from-db" value="true" />
<add key="mail.certificate-permit" value="true" />
@ -156,17 +152,11 @@
</connectionStrings>
<teamlab>
<services>
<add type="ASC.Socket.IO.Svc.Launcher, ASC.Socket.IO.Svc" />
<add type="ASC.Radicale.Launcher, ASC.Radicale" />
<add type="ASC.Notify.NotifyServiceLauncher, ASC.Notify" />
<add type="ASC.Feed.Aggregator.FeedAggregatorLauncher, ASC.Feed.Aggregator" />
<add type="ASC.Data.Backup.Service.BackupServiceLauncher, ASC.Data.Backup" />
<add type="ASC.Data.Storage.Migration.Launcher, ASC.Data.Storage.Migration" />
<add type="ASC.ElasticSearch.Launcher, ASC.ElasticSearch" />
<add type="ASC.Thumbnails.Svc.Launcher, ASC.Thumbnails.Svc" />
<add type="ASC.SsoAuth.Svc.Launcher, ASC.SsoAuth.Svc" />
<add type="ASC.UrlShortener.Svc.Launcher, ASC.UrlShortener.Svc" />
<add type="ASC.WebDav.Svc.Launcher, ASC.WebDav.Svc" />
<add type="ASC.TelegramService.Launcher, ASC.TelegramService" />
<add type="ASC.Data.Storage.Encryption.Launcher, ASC.Data.Storage.Encryption" />
<add type="ASC.Files.ThumbnailBuilder.Launcher, ASC.Files.ThumbnailBuilder" />
@ -196,15 +186,6 @@
</backup>
<feed aggregatePeriod="0:3:0" />
<autoCleanUp period="0:5:0" />
<socketio path="..\ASC.Socket.IO" port="9899">
<redis host="" port="" />
</socketio>
<urlshortener path="..\ASC.UrlShortener" port="9999" />
<webdav path="..\ASC.WebDav" port="9889" />
<thumb path="..\ASC.Thumbnails" port="9800" />
<ssoauth path="..\ASC.SsoAuth" port="9834" />
<radicale path="">
</radicale>
<thumbnailBuilder connectionStringName="default" serverRoot="http://localhost/" attemptsLimit="10" />
<system.serviceModel>
<services>

View File

@ -4,6 +4,7 @@ set -e
LETSENCRYPT_ROOT_DIR="/etc/letsencrypt";
ROOT_DIR="/var/www/onlyoffice/Data/certs";
CERTIFICATE_NAME="communityserver"
_domains="";
@ -15,18 +16,18 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
mkdir -p ${ROOT_DIR}
certbot certonly --expand --webroot -w ${ROOT_DIR} --noninteractive --agree-tos --email support@$1 $_domains;
certbot certonly --expand --webroot -w ${ROOT_DIR} --cert-name ${CERTIFICATE_NAME} --noninteractive --agree-tos --email support@$1 $_domains;
cp -f ${LETSENCRYPT_ROOT_DIR}/live/$1/fullchain.pem ${ROOT_DIR}/onlyoffice.crt
cp -f ${LETSENCRYPT_ROOT_DIR}/live/$1/privkey.pem ${ROOT_DIR}/onlyoffice.key
cp -f ${LETSENCRYPT_ROOT_DIR}/live/$1/chain.pem ${ROOT_DIR}/stapling.trusted.crt
cp -f ${LETSENCRYPT_ROOT_DIR}/live/${CERTIFICATE_NAME}/fullchain.pem ${ROOT_DIR}/onlyoffice.crt
cp -f ${LETSENCRYPT_ROOT_DIR}/live/${CERTIFICATE_NAME}/privkey.pem ${ROOT_DIR}/onlyoffice.key
cp -f ${LETSENCRYPT_ROOT_DIR}/live/${CERTIFICATE_NAME}/chain.pem ${ROOT_DIR}/stapling.trusted.crt
cat > ${LETSENCRYPT_ROOT_DIR}/renewal-hooks/deploy/communityserver.sh <<END
#!/bin/bash
cp -f ${LETSENCRYPT_ROOT_DIR}/live/$1/fullchain.pem ${ROOT_DIR}/onlyoffice.crt
cp -f ${LETSENCRYPT_ROOT_DIR}/live/$1/privkey.pem ${ROOT_DIR}/onlyoffice.key
cp -f ${LETSENCRYPT_ROOT_DIR}/live/$1/chain.pem ${ROOT_DIR}/stapling.trusted.crt
cp -f ${LETSENCRYPT_ROOT_DIR}/live/${CERTIFICATE_NAME}/fullchain.pem ${ROOT_DIR}/onlyoffice.crt
cp -f ${LETSENCRYPT_ROOT_DIR}/live/${CERTIFICATE_NAME}/privkey.pem ${ROOT_DIR}/onlyoffice.key
cp -f ${LETSENCRYPT_ROOT_DIR}/live/${CERTIFICATE_NAME}/chain.pem ${ROOT_DIR}/stapling.trusted.crt
service nginx reload

View File

@ -1,12 +1,12 @@
[Unit]
Description=ONLYOFFICE AutoCleanUp Service
Description=ONLYOFFICE FilesTrashCleaner Service
After=network.target syslog.target mysql.service
Wants=mysql.service
[Service]
Type=forking
ExecStartPre=/bin/bash -c 'rm -f /tmp/onlyofficeAutoCleanUp'
ExecStart=/usr/bin/mono-service -d:/var/www/onlyoffice/Services/TeamLabSvc -l:/tmp/onlyofficeAutoCleanUp /var/www/onlyoffice/Services/TeamLabSvc/TeamLabSvc.exe --service \"ASC.Files.AutoCleanUp.Launcher,ASC.Files.AutoCleanUp\" --log AutoCleanUp
ExecStart=/usr/bin/mono-service -d:/var/www/onlyoffice/Services/TeamLabSvc -l:/tmp/onlyofficeAutoCleanUp /var/www/onlyoffice/Services/TeamLabSvc/TeamLabSvc.exe --service \"ASC.Files.AutoCleanUp.Launcher,ASC.Files.AutoCleanUp\" --log FilesTrashCleaner
Environment=MONO_IOMAP=all MONO_PATH=/var/www/onlyoffice/Services/TeamLabSvc/
User=onlyoffice
Group=onlyoffice
@ -17,4 +17,4 @@ Restart=always
PrivateTmp=false
[Install]
WantedBy=multi-user.target
WantedBy=multi-user.target

View File

@ -8,7 +8,7 @@ Type=notify
User=onlyoffice
Group=onlyoffice
WorkingDirectory=/var/www/onlyoffice/Services/MailImap/
ExecStart=/usr/bin/dotnet /var/www/onlyoffice/Services/MailImap/ASC.Mail.ImapSync.dll --urls=http://0.0.0.0:5026 --pathToConf=/etc/onlyoffice/communityserver --pathToNlogConf=/etc/onlyoffice/communityserver --log:dir=/var/log/onlyoffice/mail --log:name=mail-imapsync --ENVIRONMENT=production
ExecStart=/usr/bin/dotnet /var/www/onlyoffice/Services/MailImap/ASC.Mail.ImapSync.Service.dll --urls=http://0.0.0.0:5026 --pathToConf=/etc/onlyoffice/communityserver --pathToNlogConf=/etc/onlyoffice/communityserver --log:dir=/var/log/onlyoffice/mail --log:name=mail-imapsync --ENVIRONMENT=production
Environment=OPENSSL_CONF=/etc/onlyoffice/communityserver/openssl.cnf
TimeoutSec=600

View File

@ -4,10 +4,10 @@ After=network.target syslog.target mysql.service redis-server.service
Wants=mysql.service redis-server.service
[Service]
Type=forking
Type=simple
WorkingDirectory=/var/www/onlyoffice/Services/TeamLabSvc
ExecStartPre=/bin/bash -c 'rm -f /tmp/onlyofficeRadicale'
ExecStart=/usr/bin/mono-service -d:/var/www/onlyoffice/Services/TeamLabSvc -l:/tmp/onlyofficeRadicale /var/www/onlyoffice/Services/TeamLabSvc/TeamLabSvc.exe --service \"ASC.Radicale.Launcher,ASC.Radicale\" --log Radicale
Environment=MONO_IOMAP=all MONO_PATH=/var/www/onlyoffice/Services/TeamLabSvc/
ExecStart=/usr/bin/python3 -m radicale --config /var/www/onlyoffice/Services/TeamLabSvc/radicale.config
User=onlyoffice
Group=onlyoffice
# Give up if ping don't get an answer

View File

@ -4,10 +4,10 @@ After=network.target syslog.target mysql.service redis-server.service
Wants=mysql.service redis-server.service
[Service]
Type=forking
Type=simple
WorkingDirectory=/var/www/onlyoffice/Services/ASC.Socket.IO/
ExecStartPre=/bin/bash -c 'rm -f /tmp/onlyofficeSocketIO'
ExecStart=/usr/bin/mono-service -d:/var/www/onlyoffice/Services/TeamLabSvc -l:/tmp/onlyofficeSocketIO /var/www/onlyoffice/Services/TeamLabSvc/TeamLabSvc.exe --service \"ASC.Socket.IO.Svc.Launcher,ASC.Socket.IO.Svc\" --log SocketIO
Environment=MONO_IOMAP=all MONO_PATH=/var/www/onlyoffice/Services/TeamLabSvc/
ExecStart=/usr/bin/node /var/www/onlyoffice/Services/ASC.Socket.IO/app.js UNIX.SERVER
User=onlyoffice
Group=onlyoffice
# Give up if ping don't get an answer

View File

@ -3,10 +3,10 @@ Description=ONLYOFFICE SsoAuth Service
After=network.target syslog.target
[Service]
Type=forking
Type=simple
WorkingDirectory=/var/www/onlyoffice/Services/ASC.SsoAuth
ExecStartPre=/bin/bash -c 'rm -f /tmp/onlyofficeSsoAuth'
ExecStart=/usr/bin/mono-service -d:/var/www/onlyoffice/Services/TeamLabSvc -l:/tmp/onlyofficeSsoAuth /var/www/onlyoffice/Services/TeamLabSvc/TeamLabSvc.exe --service \"ASC.SsoAuth.Svc.Launcher,ASC.SsoAuth.Svc\" --log SsoAuth
Environment=MONO_IOMAP=all MONO_PATH=/var/www/onlyoffice/Services/TeamLabSvc/
ExecStart=/usr/bin/node /var/www/onlyoffice/Services/ASC.SsoAuth/app.js UNIX.SERVER
User=onlyoffice
Group=onlyoffice
# Give up if ping don't get an answer

View File

@ -3,10 +3,10 @@ Description=ONLYOFFICE Thumb Service
After=network.target syslog.target
[Service]
Type=forking
Type=simple
WorkingDirectory=/var/www/onlyoffice/Services/ASC.Thumbnails
ExecStartPre=/bin/bash -c 'rm -f /tmp/onlyofficeThumb'
ExecStart=/usr/bin/mono-service -d:/var/www/onlyoffice/Services/TeamLabSvc -l:/tmp/onlyofficeThumb /var/www/onlyoffice/Services/TeamLabSvc/TeamLabSvc.exe --service \"ASC.Thumbnails.Svc.Launcher,ASC.Thumbnails.Svc\" --log Thumb
Environment=MONO_IOMAP=all MONO_PATH=/var/www/onlyoffice/Services/TeamLabSvc/
ExecStart=/usr/bin/node /var/www/onlyoffice/Services/ASC.Thumbnails/index.js UNIX.SERVER
User=onlyoffice
Group=onlyoffice
# Give up if ping don't get an answer

View File

@ -4,10 +4,10 @@ After=network.target syslog.target mysql.service
Wants=mysql.service
[Service]
Type=forking
Type=simple
WorkingDirectory=/var/www/onlyoffice/Services/ASC.UrlShortener/
ExecStartPre=/bin/bash -c 'rm -f /tmp/onlyofficeUrlShortener'
ExecStart=/usr/bin/mono-service -d:/var/www/onlyoffice/Services/TeamLabSvc -l:/tmp/onlyofficeUrlShortener /var/www/onlyoffice/Services/TeamLabSvc/TeamLabSvc.exe --service \"ASC.UrlShortener.Svc.Launcher,ASC.UrlShortener.Svc\" --log UrlShortener
Environment=MONO_IOMAP=all MONO_PATH=/var/www/onlyoffice/Services/TeamLabSvc/
ExecStart=/usr/bin/node /var/www/onlyoffice/Services/ASC.UrlShortener/index.js UNIX.SERVER
User=onlyoffice
Group=onlyoffice
# Give up if ping don't get an answer

View File

@ -4,10 +4,10 @@ After=network.target syslog.target mysql.service
Wants=mysql.service
[Service]
Type=forking
Type=simple
WorkingDirectory=/var/www/onlyoffice/Services/ASC.WebDav/server
ExecStartPre=/bin/bash -c 'rm -f /tmp/onlyofficeWebDav'
ExecStart=/usr/bin/mono-service -d:/var/www/onlyoffice/Services/TeamLabSvc -l:/tmp/onlyofficeWebDav /var/www/onlyoffice/Services/TeamLabSvc/TeamLabSvc.exe --service \"ASC.WebDav.Svc.Launcher,ASC.WebDav.Svc\" --log WebDav
Environment=MONO_IOMAP=all MONO_PATH=/var/www/onlyoffice/Services/TeamLabSvc/
ExecStart=/usr/bin/node /var/www/onlyoffice/Services/ASC.WebDav/server/webDavServer.js UNIX.SERVER
User=onlyoffice
Group=onlyoffice
# Give up if ping don't get an answer

View File

@ -44,31 +44,31 @@ apply_connection_string(){
done
fi
sed "s!\"host\":.*,!\"host\":\"${DB_HOST}\",!" -i ${APP_SERVICES_DIR}/ASC.UrlShortener/config/config.json
sed "s!\"user\":.*,!\"user\":\"${DB_USER}\",!" -i ${APP_SERVICES_DIR}/ASC.UrlShortener/config/config.json
sed "s!\"password\":.*,!\"password\":\"${DB_PWD//!/\\!}\",!" -i ${APP_SERVICES_DIR}/ASC.UrlShortener/config/config.json
sed "s!\"database\":.*!\"database\":\"${DB_NAME}\"!" -i ${APP_SERVICES_DIR}/ASC.UrlShortener/config/config.json
find "${APP_SERVICES_DIR}/ASC.UrlShortener/config" -type f -name "*.json" -exec sed -i \
-e "s!\(\"host\":\).*,!\1 \"${DB_HOST}\",!" \
-e "s!\(\"user\":\).*,!\1 \"${DB_USER}\",!" \
-e "s!\(\"password\":\).*,!\1 \"${DB_PWD//!/\\!}\",!" \
-e "s!\(\"database\":\).*!\1 \"${DB_NAME}\"!" {} \;
fi
sed -i "s/Server=.*/Server=$DB_HOST;Port=3306;Database=$DB_NAME;User ID=$DB_USER;Password=$DB_PWD;Pooling=true;Character Set=utf8;AutoEnlist=false;SSL Mode=none;AllowPublicKeyRetrieval=True;ConnectionReset=false\",/g" /etc/{{package_sysname}}/communityserver/appsettings.production.json
}
apply_core_machinekey(){
binDirs=("WebStudio" "ApiSystem" "Services/TeamLabSvc")
db_get {{package_sysname}}-communityserver/machinekey || true
CORE_MACHINEKEY="${RET:-$(sed -n '/"core.machinekey"/s!.*value\s*=\s*"\([^"]*\)".*!\1!p' ${DIR}/WebStudio/web.appsettings.config)}";
[ -z "$RET" ] && db_set {{package_sysname}}-communityserver/machinekey "${CORE_MACHINEKEY}" || true
if [ -d /var/www/{{package_sysname}}/ ]; then
for i in "${!binDirs[@]}";
do
if [ ! -z $CORE_MACHINEKEY ]; then
find "$DIR/${binDirs[$i]}" -type f -name "*.[cC]onfig" -exec sed -i '/core.\machinekey/s!\(value\s*=\s*\"\)[^\"]*\"!\1'${CORE_MACHINEKEY}'\"!' {} \;
fi
done
fi
if [ ! -z $CORE_MACHINEKEY ]; then
sed "s!\"core\.machinekey\":.*!\"core\.machinekey\":\"${CORE_MACHINEKEY}\",!" -i ${APP_SERVICES_DIR}/ASC.UrlShortener/config/config.json
sed "s!\"machinekey\":.*!\"machinekey\":\"${CORE_MACHINEKEY}\",!" -i /etc/{{package_sysname}}/communityserver/appsettings.production.json
fi
sed "s^\(machine_key\)\s*=.*^\1 = ${CORE_MACHINEKEY}^g" -i ${APP_SERVICES_DIR}/TeamLabSvc/radicale.config
binDirs=("$DIR/ApiSystem/" "$DIR/WebStudio" "$DIR/controlpanel/www/config" "$APP_SERVICES_DIR" "/etc/{{package_sysname}}/communityserver")
for i in "${!binDirs[@]}"; do
if [ -d "${binDirs[$i]}" ]; then
find "${binDirs[$i]}" -type f -name "*.[cC]onfig" -exec sed -i "/core.\machinekey/s_\(value\s*=\s*\"\)[^\"]*\"_\1${CORE_MACHINEKEY}\"_" {} \;
find "${binDirs[$i]}" -type f -name "*.json" -exec sed -i "s_\(\"core.machinekey\":\|\"machinekey\":\).*,_\1 \"${CORE_MACHINEKEY}\",_" {} \;
fi
done
}
install_db(){
@ -139,6 +139,18 @@ install_db(){
else
sed "s/default-authentication-plugin.*/default-authentication-plugin = mysql_native_password/" -i ${CNF_PATH} || true # ignore errors
fi
if ! grep -q "^interactive_timeout" ${CNF_PATH}; then
sed '/\[mysqld\]/a interactive_timeout = 900' -i ${CNF_PATH}
else
sed "s/interactive_timeout.*/interactive_timeout = 900/" -i ${CNF_PATH} || true # ignore errors
fi
if ! grep -q "^wait_timeout" ${CNF_PATH}; then
sed '/\[mysqld\]/a wait_timeout = 900' -i ${CNF_PATH}
else
sed "s/wait_timeout.*/wait_timeout = 900/" -i ${CNF_PATH} || true # ignore errors
fi
if [ -e ${CNF_SERVICE_PATH} ]; then
if ! grep -q "^LimitNOFILE" ${CNF_SERVICE_PATH}; then
@ -182,7 +194,12 @@ install_db(){
done
fi
if ! grep -q "client_max_body_size" /etc/nginx/nginx.conf; then
sed -i '/http {/a\ client_max_body_size 100m;' /etc/nginx/nginx.conf
else
sed -i "s/\(client_max_body_size\).*\?\;/\1 100m;/" /etc/nginx/nginx.conf
fi
if [ ! -f /proc/net/if_inet6 ]; then
sed '/listen\s*\[::\]:80/d' -i ${NGINX_ROOT_DIR}/includes/onlyoffice-communityserver-common-ssl.conf.template
sed '/listen\s*\[::\]:443/d' -i ${NGINX_ROOT_DIR}/includes/onlyoffice-communityserver-common-ssl.conf.template
@ -264,6 +281,9 @@ END
fi
fi
[ -f /usr/lib/python3.$(python3 -c 'import sys; print(sys.version_info.minor)')/EXTERNALLY-MANAGED ] && \
rm /usr/lib/python3.$(python3 -c 'import sys; print(sys.version_info.minor)')/EXTERNALLY-MANAGED
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade requests
python3 -m pip install --upgrade setuptools
@ -437,22 +457,41 @@ EOF
sed "s!\"value\":.*!\"value\":\ \"${APP_DATA_DIR}\"!" -i /etc/{{package_sysname}}/communityserver/storage.production.json
sed "s!\"folder\":.*,!\"folder\":\ \"${APP_SERVICES_DIR}\",!" -i /etc/{{package_sysname}}/communityserver/appsettings.production.json
if [ ! -f /etc/{{package_sysname}}/communityserver/openssl.cnf ] ; then
cp /etc/ssl/openssl.cnf \
/etc/{{package_sysname}}/communityserver/openssl.cnf;
sed '/new_oids$/a openssl_conf = default_conf' -i /etc/{{package_sysname}}/communityserver/openssl.cnf
cat >> /etc/{{package_sysname}}/communityserver/openssl.cnf <<EOF
[default_conf]
ssl_conf = ssl_sect
OPENSSL_CONF="/etc/{{package_sysname}}/communityserver/openssl.cnf"
if [ ! -f $OPENSSL_CONF ]; then
cp /etc/ssl/openssl.cnf $OPENSSL_CONF;
sed '/new_oids$/a openssl_conf = default_conf' -i $OPENSSL_CONF
if ! grep -q "\[default_conf\]" $OPENSSL_CONF; then
echo -e "[default_conf]\nssl_conf = ssl_sect\n" >> $OPENSSL_CONF
else
sed -i "s/^ssl_conf =.*/ssl_conf = ssl_sect/" $OPENSSL_CONF
fi
[ssl_sect]
system_default = system_default_sect
if ! grep -q "\[ssl_sect\]" $OPENSSL_CONF; then
echo -e "[ssl_sect]\nsystem_default = system_default_sect\n" >> $OPENSSL_CONF
else
sed -i "s/^system_default =.*/system_default = system_default_sect/" $OPENSSL_CONF
fi
[system_default_sect]
MinProtocol = TLSv1.2
CipherString = ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384
Ciphersuites = TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256:TLS_AES_128_CCM_SHA256
EOF
CIPHERSTRING="DEFAULT@SECLEVEL=1"
if ! grep -q "\[system_default_sect\]" $OPENSSL_CONF; then
echo -e "[system_default_sect] \n\
MinProtocol = TLSv1.2 \n\
CipherString = $CIPHERSTRING \n" >> $OPENSSL_CONF
else
if ! grep -q "MinProtocol =" $OPENSSL_CONF; then
sed "/\[system_default_sect\]/a MinProtocol = TLSv1.2" -i $OPENSSL_CONF
else
sed -i "s/^MinProtocol =.*/MinProtocol = TLSv1.2/" $OPENSSL_CONF
fi
if ! grep -q "CipherString =" $OPENSSL_CONF; then
sed "/\[system_default_sect\]/a CipherString = $CIPHERSTRING" -i $OPENSSL_CONF
else
sed -i "s/^CipherString =.*/CipherString = $CIPHERSTRING/" $OPENSSL_CONF
fi
fi
fi
# setup xmppserver

View File

@ -15,7 +15,7 @@ override_dh_systemd_enable:
dh_systemd_enable --name={{package_sysname}}Telegram
dh_systemd_enable --name={{package_sysname}}Thumb
dh_systemd_enable --name={{package_sysname}}UrlShortener
dh_systemd_enable --name={{package_sysname}}AutoCleanUp
dh_systemd_enable --name={{package_sysname}}FilesTrashCleaner
dh_systemd_enable --name={{package_sysname}}WebDav
dh_systemd_enable --name={{package_sysname}}Radicale
dh_systemd_enable --name={{package_sysname}}Index
@ -39,7 +39,7 @@ override_dh_installinit:
dh_installinit --name={{package_sysname}}Telegram
dh_installinit --name={{package_sysname}}Thumb
dh_installinit --name={{package_sysname}}UrlShortener
dh_installinit --name={{package_sysname}}AutoCleanUp
dh_installinit --name={{package_sysname}}FilesTrashCleaner
dh_installinit --name={{package_sysname}}WebDav
dh_installinit --name={{package_sysname}}Radicale
dh_installinit --name={{package_sysname}}Index
@ -63,7 +63,7 @@ override_dh_systemd_start:
dh_systemd_start --name={{package_sysname}}Telegram
dh_systemd_start --name={{package_sysname}}Thumb
dh_systemd_start --name={{package_sysname}}UrlShortener
dh_systemd_start --name={{package_sysname}}AutoCleanUp
dh_systemd_start --name={{package_sysname}}FilesTrashCleaner
dh_systemd_start --name={{package_sysname}}WebDav
dh_systemd_start --name={{package_sysname}}Radicale
dh_systemd_start --name={{package_sysname}}Index

View File

@ -42,3 +42,8 @@ Template: {{package_sysname}}-communityserver/imapsync-start-date
Type: string
Default:
Description: ImapSync service launch date:
Template: {{package_sysname}}-communityserver/machinekey
Type: string
Default:
Description: Enter your own machinekey:

View File

@ -4,6 +4,7 @@ set -e
LETSENCRYPT_ROOT_DIR="/etc/letsencrypt";
ROOT_DIR="/var/www/onlyoffice/Data/certs";
CERTIFICATE_NAME="communityserver"
_domains="";
@ -15,18 +16,18 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
mkdir -p ${ROOT_DIR}
certbot certonly --expand --webroot -w ${ROOT_DIR} --noninteractive --agree-tos --email support@$1 $_domains;
certbot certonly --expand --webroot -w ${ROOT_DIR} --cert-name ${CERTIFICATE_NAME} --noninteractive --agree-tos --email support@$1 $_domains;
cp -f ${LETSENCRYPT_ROOT_DIR}/live/$1/fullchain.pem ${ROOT_DIR}/onlyoffice.crt
cp -f ${LETSENCRYPT_ROOT_DIR}/live/$1/privkey.pem ${ROOT_DIR}/onlyoffice.key
cp -f ${LETSENCRYPT_ROOT_DIR}/live/$1/chain.pem ${ROOT_DIR}/stapling.trusted.crt
cp -f ${LETSENCRYPT_ROOT_DIR}/live/${CERTIFICATE_NAME}/fullchain.pem ${ROOT_DIR}/onlyoffice.crt
cp -f ${LETSENCRYPT_ROOT_DIR}/live/${CERTIFICATE_NAME}/privkey.pem ${ROOT_DIR}/onlyoffice.key
cp -f ${LETSENCRYPT_ROOT_DIR}/live/${CERTIFICATE_NAME}/chain.pem ${ROOT_DIR}/stapling.trusted.crt
cat > ${LETSENCRYPT_ROOT_DIR}/renewal-hooks/deploy/communityserver.sh <<END
#!/bin/bash
cp -f ${LETSENCRYPT_ROOT_DIR}/live/$1/fullchain.pem ${ROOT_DIR}/onlyoffice.crt
cp -f ${LETSENCRYPT_ROOT_DIR}/live/$1/privkey.pem ${ROOT_DIR}/onlyoffice.key
cp -f ${LETSENCRYPT_ROOT_DIR}/live/$1/chain.pem ${ROOT_DIR}/stapling.trusted.crt
cp -f ${LETSENCRYPT_ROOT_DIR}/live/${CERTIFICATE_NAME}/fullchain.pem ${ROOT_DIR}/onlyoffice.crt
cp -f ${LETSENCRYPT_ROOT_DIR}/live/${CERTIFICATE_NAME}/privkey.pem ${ROOT_DIR}/onlyoffice.key
cp -f ${LETSENCRYPT_ROOT_DIR}/live/${CERTIFICATE_NAME}/chain.pem ${ROOT_DIR}/stapling.trusted.crt
systemctl reload nginx

View File

@ -1,12 +1,12 @@
[Unit]
Description=ONLYOFFICE AutoCleanUp Service
Description=ONLYOFFICE FilesTrashCleaner Service
After=network.target syslog.target mysqld.service
Wants=mysqld.service
[Service]
Type=forking
ExecStartPre=/bin/bash -c 'rm -f /tmp/onlyofficeAutoCleanUp'
ExecStart=/usr/bin/mono-service -d:/var/www/onlyoffice/Services/TeamLabSvc -l:/tmp/onlyofficeAutoCleanUp /var/www/onlyoffice/Services/TeamLabSvc/TeamLabSvc.exe --service \"ASC.Files.AutoCleanUp.Launcher,ASC.Files.AutoCleanUp\" --log AutoCleanUp
ExecStart=/usr/bin/mono-service -d:/var/www/onlyoffice/Services/TeamLabSvc -l:/tmp/onlyofficeAutoCleanUp /var/www/onlyoffice/Services/TeamLabSvc/TeamLabSvc.exe --service \"ASC.Files.AutoCleanUp.Launcher,ASC.Files.AutoCleanUp\" --log FilesTrashCleaner
Environment=MONO_IOMAP=all MONO_PATH=/var/www/onlyoffice/Services/TeamLabSvc/
User=onlyoffice
Group=onlyoffice
@ -17,4 +17,4 @@ Restart=always
PrivateTmp=false
[Install]
WantedBy=multi-user.target
WantedBy=multi-user.target

View File

@ -8,7 +8,7 @@ Type=notify
User=onlyoffice
Group=onlyoffice
WorkingDirectory=/var/www/onlyoffice/Services/MailImap/
ExecStart=/usr/bin/dotnet /var/www/onlyoffice/Services/MailImap/ASC.Mail.ImapSync.dll --urls=http://0.0.0.0:5026 --pathToConf=/etc/onlyoffice/communityserver --pathToNlogConf=/etc/onlyoffice/communityserver --log:dir=/var/log/onlyoffice/mail --log:name=mail-imapsync --ENVIRONMENT=production
ExecStart=/usr/bin/dotnet /var/www/onlyoffice/Services/MailImap/ASC.Mail.ImapSync.Service.dll --urls=http://0.0.0.0:5026 --pathToConf=/etc/onlyoffice/communityserver --pathToNlogConf=/etc/onlyoffice/communityserver --log:dir=/var/log/onlyoffice/mail --log:name=mail-imapsync --ENVIRONMENT=production
TimeoutSec=600
Restart=always

View File

@ -4,10 +4,10 @@ After=network.target syslog.target mysqld.service redis.service
Wants=mysqld.service redis.service
[Service]
Type=forking
Type=simple
WorkingDirectory=/var/www/onlyoffice/Services/TeamLabSvc
ExecStartPre=/bin/bash -c 'rm -f /tmp/onlyofficeRadicale'
ExecStart=/usr/bin/mono-service -d:/var/www/onlyoffice/Services/TeamLabSvc -l:/tmp/onlyofficeRadicale /var/www/onlyoffice/Services/TeamLabSvc/TeamLabSvc.exe --service \"ASC.Radicale.Launcher,ASC.Radicale\" --log Radicale
Environment=MONO_IOMAP=all MONO_PATH=/var/www/onlyoffice/Services/TeamLabSvc/
ExecStart=/usr/bin/python3 -m radicale --config /var/www/onlyoffice/Services/TeamLabSvc/radicale.config
User=onlyoffice
Group=onlyoffice
# Give up if ping don't get an answer

View File

@ -4,10 +4,10 @@ After=network.target syslog.target mysqld.service redis.service
Wants=mysqld.service redis.service
[Service]
Type=forking
Type=simple
WorkingDirectory=/var/www/onlyoffice/Services/ASC.Socket.IO/
ExecStartPre=/bin/bash -c 'rm -f /tmp/onlyofficeSocketIO'
ExecStart=/usr/bin/mono-service -d:/var/www/onlyoffice/Services/TeamLabSvc -l:/tmp/onlyofficeSocketIO /var/www/onlyoffice/Services/TeamLabSvc/TeamLabSvc.exe --service \"ASC.Socket.IO.Svc.Launcher,ASC.Socket.IO.Svc\" --log SocketIO
Environment=MONO_IOMAP=all MONO_PATH=/var/www/onlyoffice/Services/TeamLabSvc/
ExecStart=/usr/bin/node /var/www/onlyoffice/Services/ASC.Socket.IO/app.js UNIX.SERVER
User=onlyoffice
Group=onlyoffice
# Give up if ping don't get an answer

View File

@ -3,10 +3,10 @@ Description=ONLYOFFICE SsoAuth Service
After=network.target syslog.target
[Service]
Type=forking
Type=simple
WorkingDirectory=/var/www/onlyoffice/Services/ASC.SsoAuth
ExecStartPre=/bin/bash -c 'rm -f /tmp/onlyofficeSsoAuth'
ExecStart=/usr/bin/mono-service -d:/var/www/onlyoffice/Services/TeamLabSvc -l:/tmp/onlyofficeSsoAuth /var/www/onlyoffice/Services/TeamLabSvc/TeamLabSvc.exe --service \"ASC.SsoAuth.Svc.Launcher,ASC.SsoAuth.Svc\" --log SsoAuth
Environment=MONO_IOMAP=all MONO_PATH=/var/www/onlyoffice/Services/TeamLabSvc/
ExecStart=/usr/bin/node /var/www/onlyoffice/Services/ASC.SsoAuth/app.js UNIX.SERVER
User=onlyoffice
Group=onlyoffice
# Give up if ping don't get an answer

View File

@ -3,10 +3,10 @@ Description=ONLYOFFICE Thumb Service
After=network.target syslog.target
[Service]
Type=forking
Type=simple
WorkingDirectory=/var/www/onlyoffice/Services/ASC.Thumbnails
ExecStartPre=/bin/bash -c 'rm -f /tmp/onlyofficeThumb'
ExecStart=/usr/bin/mono-service -d:/var/www/onlyoffice/Services/TeamLabSvc -l:/tmp/onlyofficeThumb /var/www/onlyoffice/Services/TeamLabSvc/TeamLabSvc.exe --service \"ASC.Thumbnails.Svc.Launcher,ASC.Thumbnails.Svc\" --log Thumb
Environment=MONO_IOMAP=all MONO_PATH=/var/www/onlyoffice/Services/TeamLabSvc/
ExecStart=/usr/bin/node /var/www/onlyoffice/Services/ASC.Thumbnails/index.js UNIX.SERVER
User=onlyoffice
Group=onlyoffice
# Give up if ping don't get an answer

View File

@ -4,10 +4,10 @@ After=network.target syslog.target mysqld.service
Wants=mysqld.service
[Service]
Type=forking
Type=simple
WorkingDirectory=/var/www/onlyoffice/Services/ASC.UrlShortener/
ExecStartPre=/bin/bash -c 'rm -f /tmp/onlyofficeUrlShortener'
ExecStart=/usr/bin/mono-service -d:/var/www/onlyoffice/Services/TeamLabSvc -l:/tmp/onlyofficeUrlShortener /var/www/onlyoffice/Services/TeamLabSvc/TeamLabSvc.exe --service \"ASC.UrlShortener.Svc.Launcher,ASC.UrlShortener.Svc\" --log UrlShortener
Environment=MONO_IOMAP=all MONO_PATH=/var/www/onlyoffice/Services/TeamLabSvc/
ExecStart=/usr/bin/node /var/www/onlyoffice/Services/ASC.UrlShortener/index.js UNIX.SERVER
User=onlyoffice
Group=onlyoffice
# Give up if ping don't get an answer

View File

@ -4,10 +4,10 @@ After=network.target syslog.target mysqld.service
Wants=mysqld.service
[Service]
Type=forking
Type=simple
WorkingDirectory=/var/www/onlyoffice/Services/ASC.WebDav/server
ExecStartPre=/bin/bash -c 'rm -f /tmp/onlyofficeWebDav'
ExecStart=/usr/bin/mono-service -d:/var/www/onlyoffice/Services/TeamLabSvc -l:/tmp/onlyofficeWebDav /var/www/onlyoffice/Services/TeamLabSvc/TeamLabSvc.exe --service \"ASC.WebDav.Svc.Launcher,ASC.WebDav.Svc\" --log WebDav
Environment=MONO_IOMAP=all MONO_PATH=/var/www/onlyoffice/Services/TeamLabSvc/
ExecStart=/usr/bin/node /var/www/onlyoffice/Services/ASC.WebDav/server/webDavServer.js UNIX.SERVER
User=onlyoffice
Group=onlyoffice
# Give up if ping don't get an answer

View File

@ -142,6 +142,9 @@ sed 's,{{SERVICE_SSO_AUTH_HOST_ADDR}},'"${SERVICE_SSO_AUTH_HOST_ADDR}"',' -i ${N
sed '/web\.controlpanel\.url/s/\(value\s*=\s*\"\)[^\"]*\"/\1\/controlpanel\/\"/' -i ${APP_ROOT_DIR}/web.appsettings.config;
sed '/web\.controlpanel\.url/s/\(value\s*=\s*\"\)[^\"]*\"/\1\/controlpanel\/\"/' -i ${APP_SERVICES_ROOT_DIR}/TeamLabSvc/TeamLabSvc.exe.config;
CORE_MACHINEKEY="$(sed -n '/"core.machinekey"/s!.*value\s*=\s*"\([^"]*\)".*!\1!p' ${DIR}/WebStudio/web.appsettings.config)";
find "$DIR/controlpanel/www/config" -type f -name "*.json" -exec sed -i "s_\(\"core.machinekey\":\).*,_\1 \"${CORE_MACHINEKEY}\",_" {} \;
if systemctl is-active monoserve | grep -q "active"; then
systemctl restart monoserve
fi
@ -251,6 +254,23 @@ APP_DATA_DIR="${DIR}/Data"
mkdir -p "$APP_DATA_DIR"
binDirs=("$DIR/ApiSystem/" "$DIR/WebStudio" "$DIR/controlpanel/www/config" "$SERVICES_DIR" "/etc/%{package_sysname}/communityserver")
if [ -f $DIR/WebStudio/web.appsettings.config.rpmsave ]; then
CORE_MACHINEKEY="$(sed -n '/"core.machinekey"/s!.*value\s*=\s*"\([^"]*\)".*!\1!p' ${DIR}/WebStudio/web.appsettings.config.rpmsave)";
else
CORE_MACHINEKEY="$(sed -n '/"core.machinekey"/s!.*value\s*=\s*"\([^"]*\)".*!\1!p' ${DIR}/WebStudio/web.appsettings.config)";
fi
sed "s^\(machine_key\)\s*=.*^\1 = ${CORE_MACHINEKEY}^g" -i ${SERVICES_DIR}/TeamLabSvc/radicale.config
for i in "${!binDirs[@]}"; do
if [ -d "${binDirs[$i]}" ]; then
find "${binDirs[$i]}" -type f -name "*.[cC]onfig" -exec sed -i "/core.\machinekey/s_\(value\s*=\s*\"\)[^\"]*\"_\1${CORE_MACHINEKEY}\"_" {} \;
find "${binDirs[$i]}" -type f -name "*.json" -exec sed -i "s_\(\"core.machinekey\":\|\"machinekey\":\).*,_\1 \"${CORE_MACHINEKEY}\",_" {} \;
fi
done
#Mail configs changes
if [ -f $DIR/WebStudio/web.appsettings.config.rpmsave ]; then
MAIL_IMAPSYNC_START_DATE="$(sed -n '/"mail.imap-sync-start-date"/s_.*value\s*=\s*"\([^"]*\)".*_\1_p' ${DIR}/WebStudio/web.appsettings.config.rpmsave)";
@ -294,36 +314,22 @@ if [ $1 -ge 2 ]; then
if [ -d "$DIR" ]; then
CONN_STR=$(grep -oP "Server=[^\"]*(?=\")" $DIR/WebStudio/web.connections.config | head -1)
if [ -f $DIR/WebStudio/web.appsettings.config.rpmsave ]; then
CORE_MACHINEKEY="$(sed -n '/"core.machinekey"/s!.*value\s*=\s*"\([^"]*\)".*!\1!p' ${DIR}/WebStudio/web.appsettings.config.rpmsave)";
fi
binDirs=("WebStudio" "ApiSystem" "Services/TeamLabSvc")
for i in "${!binDirs[@]}";
do
find "$DIR/${binDirs[$i]}" -type f -name "*.[cC]onfig" -exec sed -i "s/connectionString=.*/connectionString=\"$CONN_STR\" providerName=\"MySql.Data.MySqlClient\"\/>/" {} \;
sed -i "s/Server=.*/$CONN_STR\",/g" /etc/%{package_sysname}/communityserver/appsettings.production.json
if [ ! -z "$CORE_MACHINEKEY" ]; then
find "$DIR/${binDirs[$i]}" -type f -name "*.[cC]onfig" -exec sed -i "/core.machinekey/s!value=\".*\"!value=\"${CORE_MACHINEKEY}\"!g" {} \;
sed "s!\"machinekey\":.*!\"machinekey\":\"${CORE_MACHINEKEY}\",!" -i /etc/%{package_sysname}/communityserver/appsettings.production.json
fi
done
binDirs=("$DIR/ApiSystem/" "$DIR/WebStudio" "$SERVICES_DIR/TeamLabSvc")
for i in "${!binDirs[@]}"; do
find "${binDirs[$i]}" -type f -name "*.[cC]onfig" -exec sed -i "s/connectionString=.*/connectionString=\"${CONN_STR}\" providerName=\"MySql.Data.MySqlClient\"\/>/" {} \;
done
sed -i "s!\(\"connectionString\":\).*,!\1 \"${CONN_STR//!/\\!}\",!" /etc/%{package_sysname}/communityserver/appsettings.production.json
MYSQL_SERVER_HOST=$(grep -oP "Server=[^\";]*" $DIR/WebStudio/web.connections.config | head -1 | cut -d'=' -f2);
MYSQL_SERVER_DB_NAME=$(grep -oP "Database=[^\";]*" $DIR/WebStudio/web.connections.config | head -1 | cut -d'=' -f2);
MYSQL_SERVER_USER=$(grep -oP "User ID=[^\";]*" $DIR/WebStudio/web.connections.config | head -1 | cut -d'=' -f2);
MYSQL_SERVER_PASS=$(grep -oP "Password=[^\";]*" $DIR/WebStudio/web.connections.config | head -1 | cut -d'=' -f2);
sed "s!\"host\":.*,!\"host\":\"${MYSQL_SERVER_HOST}\",!" -i ${SERVICES_DIR}/ASC.UrlShortener/config/config.json
sed "s!\"user\":.*,!\"user\":\"${MYSQL_SERVER_USER}\",!" -i ${SERVICES_DIR}/ASC.UrlShortener/config/config.json
sed "s!\"password\":.*,!\"password\":\"${MYSQL_SERVER_PASS//!/\\!}\",!" -i ${SERVICES_DIR}/ASC.UrlShortener/config/config.json
sed "s!\"database\":.*!\"database\":\"${MYSQL_SERVER_DB_NAME}\"!" -i ${SERVICES_DIR}/ASC.UrlShortener/config/config.json
if [ ! -z "$CORE_MACHINEKEY" ]; then
sed "s!\"core\.machinekey\":.*!\"core\.machinekey\":\"${CORE_MACHINEKEY}\",!" -i ${SERVICES_DIR}/ASC.UrlShortener/config/config.json
fi
find "${SERVICES_DIR}/ASC.UrlShortener/config" -type f -name "*.json" -exec sed -i \
-e "s!\(\"host\":\).*,!\1 \"${MYSQL_SERVER_HOST}\",!" \
-e "s!\(\"user\":\).*,!\1 \"${MYSQL_SERVER_USER}\",!" \
-e "s!\(\"password\":\).*,!\1 \"${MYSQL_SERVER_PASS//!/\\!}\",!" \
-e "s!\(\"database\":\).*!\1 \"${MYSQL_SERVER_DB_NAME}\"!" {} \;
if ! mysqladmin ping -h ${MYSQL_SERVER_HOST} -u ${MYSQL_SERVER_USER} --password=${MYSQL_SERVER_PASS} --silent; then
echo "ERROR: mysql connection refused";
@ -431,6 +437,12 @@ if systemctl is-active elasticsearch | grep -q "active"; then
fi
fi
if ! grep -q "client_max_body_size" /etc/nginx/nginx.conf; then
sed -i '/http {/a\ client_max_body_size 100m;' /etc/nginx/nginx.conf
else
sed -i "s/\(client_max_body_size\).*\?\;/\1 100m;/" /etc/nginx/nginx.conf
fi
if [ ! -f /proc/net/if_inet6 ]; then
sed '/listen\s*\[::\]:80/d' -i /etc/nginx/includes/%{package_sysname}-communityserver-common-ssl.conf.template
sed '/listen\s*\[::\]:443/d' -i /etc/nginx/includes/%{package_sysname}-communityserver-common-ssl.conf.template

View File

@ -3,9 +3,9 @@
%global package_header_tag_url http://onlyoffice.com/
%global package_header_tag_vendor Ascensio System SIA
%global package_header_tag_packager Ascensio System SIA <support@onlyoffice.com>
%global package_header_tag_requires mono-complete >= 6.8.0, nginx >= 1.9.5, mysql-server >= 5.7.0, wget, mono-webserver-hyperfastcgi, nodejs >= 12.0.0, redis >= 3.0.0, elasticsearch = 7.16.3-1, python3 >= 3.6, ffmpeg, jq
%global package_header_tag_requires mono-complete >= 6.8.0, nginx >= 1.9.5, mysql-server >= 5.7.0, wget, mono-webserver-hyperfastcgi, nodejs >= 12.0.0, redis >= 3.0.0, elasticsearch = 7.16.3-1, python3 >= 3.6, ffmpeg, jq, dotnet-sdk-7.0
%global package_section_description "Community Server is a free open-source collaborative system developed to manage documents, projects, customer relationship and emails, all in one place."
%global package_services god monoserve monoserveApiSystem onlyofficeSocketIO onlyofficeThumb onlyofficeTelegram onlyofficeBackup onlyofficeFeed onlyofficeIndex onlyofficeNotify onlyofficeMailAggregator onlyofficeMailWatchdog onlyofficeMailCleaner onlyofficeMailImap onlyofficeStorageMigrate onlyofficeStorageEncryption onlyofficeUrlShortener onlyofficeWebDav onlyofficeAutoCleanUp onlyofficeRadicale onlyofficeThumbnailBuilder onlyofficeSsoAuth
%global package_services god monoserve monoserveApiSystem onlyofficeSocketIO onlyofficeThumb onlyofficeTelegram onlyofficeBackup onlyofficeFeed onlyofficeIndex onlyofficeNotify onlyofficeMailAggregator onlyofficeMailWatchdog onlyofficeMailCleaner onlyofficeMailImap onlyofficeStorageMigrate onlyofficeStorageEncryption onlyofficeUrlShortener onlyofficeWebDav onlyofficeFilesTrashCleaner onlyofficeRadicale onlyofficeThumbnailBuilder onlyofficeSsoAuth
%global package_sysname onlyoffice

View File

@ -196,7 +196,21 @@
<CreateItem Include="$(OutDir)WebStudio\web.appsettings.config;$(OutDir)WebStudio\web.connections.config;$(OutDir)WebStudio\web.storage.config;$(OutDir)WebStudio\web.autofac.config;$(OutDir)WebStudio\web.consumers.config">
<Output ItemName="WebConfigurationFiles" TaskParameter="Include" />
</CreateItem>
<Copy Condition="Exists('$(RootDir)build\install\install.bat')" SourceFiles="$(RootDir)build\install\install.bat" DestinationFolder="$(OutDir)Services\TeamLabSvc\" />
<Copy Condition="Exists('$(RootDir)build\install\uninstall.bat')" SourceFiles="$(RootDir)build\install\uninstall.bat" DestinationFolder="$(OutDir)Services\TeamLabSvc\" />
<Copy Condition="Exists('$(RootDir)build\start\start.bat')" SourceFiles="$(RootDir)build\start\start.bat" DestinationFolder="$(OutDir)Services\TeamLabSvc\" />
<Copy Condition="Exists('$(RootDir)build\start\stop.bat')" SourceFiles="$(RootDir)build\start\stop.bat" DestinationFolder="$(OutDir)Services\TeamLabSvc\" />
<Copy Condition="Exists('$(RootDir)build\start\command.ps1')" SourceFiles="$(RootDir)build\start\command.ps1" DestinationFolder="$(OutDir)Services\TeamLabSvc\" />
<Copy Condition="Exists('$(RootDir)build\ManageServices.bat')" SourceFiles="$(RootDir)build\ManageServices.bat" DestinationFolder="$(OutDir)Services\TeamLabSvc\" />
<Copy Condition="Exists('$(RootDir)build\WinSW3.0.0.exe')" SourceFiles="$(RootDir)build\WinSW3.0.0.exe" DestinationFolder="$(OutDir)Services\TeamLabSvc\" />
<Copy SourceFiles="$(RootDir)build\config\private\Services\WebDav\config.js" DestinationFiles="$(OutDir)Services\ASC.WebDav\server\config.$(DeployTo).js" Condition="'$(DeployTo)'=='COM' Or '$(DeployTo)'=='EU.COM' Or '$(DeployTo)'=='SG.COM' Or '$(DeployTo)'=='INFO'" />
<Copy SourceFiles="$(RootDir)build\config\private\Services\WebDav\config.$(DeployTo).js" DestinationFiles="$(OutDir)Services\ASC.WebDav\server\config.$(DeployTo).js" Condition="'$(DeployTo)'=='GURU.INFO' Or '$(DeployTo)'=='UNIX.SERVER' Or '$(DeployTo)'=='SERVER'" />
<Copy SourceFiles="$(RootDir)build\config\private\Services\SSO\config.json" DestinationFiles="$(OutDir)Services\ASC.SsoAuth\config\config.$(DeployTo).json" Condition="'$(DeployTo)'=='COM' Or '$(DeployTo)'=='EU.COM' Or '$(DeployTo)'=='SG.COM'" />
<Copy SourceFiles="$(RootDir)build\config\private\Services\SSO\config.$(DeployTo).json" DestinationFiles="$(OutDir)Services\ASC.SsoAuth\config\config.$(DeployTo).json" Condition="'$(DeployTo)'=='INFO' Or '$(DeployTo)'=='GURU.INFO' Or '$(DeployTo)'=='UNIX.SERVER' Or '$(DeployTo)'=='SERVER'" />
<Copy SourceFiles="$(RootDir)build\config\private\Services\Thumb\config.json" DestinationFiles="$(OutDir)Services\ASC.Thumbnails\config\config.$(DeployTo).json" Condition="'$(DeployTo)'=='COM' Or '$(DeployTo)'=='EU.COM' Or '$(DeployTo)'=='SG.COM' Or '$(DeployTo)'=='INFO'" />
<Copy SourceFiles="$(RootDir)build\config\private\Services\Thumb\config.$(DeployTo).json" DestinationFiles="$(OutDir)Services\ASC.Thumbnails\config\config.$(DeployTo).json" Condition="'$(DeployTo)'=='GURU.INFO' Or '$(DeployTo)'=='UNIX.SERVER' Or '$(DeployTo)'=='SERVER'" />
<Copy SourceFiles="$(RootDir)build\config\private\Services\UrlShortener\config.$(DeployTo).json" DestinationFiles="$(OutDir)Services\ASC.UrlShortener\config\config.$(DeployTo).json" Condition="'$(DeployTo)'=='COM' Or '$(DeployTo)'=='EU.COM' Or '$(DeployTo)'=='SG.COM' Or '$(DeployTo)'=='INFO' Or '$(DeployTo)'=='GURU.INFO' Or '$(DeployTo)'=='UNIX.SERVER' Or '$(DeployTo)'=='SERVER'" />
<Copy SourceFiles="$(RootDir)build\config\private\Services\Socket.IO\config.$(DeployTo).json" DestinationFiles="$(OutDir)Services\ASC.Socket.IO\config\config.$(DeployTo).json" Condition="'$(DeployTo)'=='COM' Or '$(DeployTo)'=='EU.COM' Or '$(DeployTo)'=='SG.COM' Or '$(DeployTo)'=='INFO' Or '$(DeployTo)'=='GURU.INFO' Or '$(DeployTo)'=='UNIX.SERVER' Or '$(DeployTo)'=='SERVER'" />
<Copy Condition="Exists('$(OutDir)Uploads\')" SourceFiles="@(WebConfigurationFiles)" DestinationFolder="$(OutDir)Uploads\" />
<Copy SourceFiles="$(OutDir)WebStudio\web.storage.config" DestinationFiles="$(OutDir)Services\MailAggregator\web.storage.config" />
<Copy SourceFiles="$(OutDir)WebStudio\web.consumers.config" DestinationFolder="$(OutDir)Services\MailAggregator\" />
@ -220,6 +234,10 @@
<CallTarget Targets="LessCompile" Condition=" '$(LessCompile)' == '1' " />
<CallTarget Targets="GenerateBundle" Condition=" '$(GenerateBundle)' == '1' " />
<CallTarget Targets="GenerateHelpCenterHtml" Condition=" '$(GenerateHelpCenterHtml)' == '1' " />
<CreateItem Include="$(RootDir)build\run\Radicale.xml;$(RootDir)build\run\SsoAuth.xml;$(RootDir)build\run\SocketIO.xml;$(RootDir)build\run\WebDav.xml;$(RootDir)build\run\UrlShortener.xml;$(RootDir)build\run\Thumb.xml">
<Output ItemName="ServicesFiles" TaskParameter="Include" />
</CreateItem>
<Copy Condition="Exists('$(RootDir)build\run\')" SourceFiles="@(ServicesFiles)" DestinationFolder="$(OutDir)Services\run\" />
</Target>
<Target Name="DeployUpload">
<Message Text="Deploying upload" />
@ -367,6 +385,21 @@
<ConfigFiles Include="$(OutDir)WebStudio\web.storage.config">
<SubstitutionsFile>..\config\private\Web.Storage.Config.Substitutions.xml</SubstitutionsFile>
</ConfigFiles>
<ConfigFiles Include="$(OutDir)Services\run\WebDav.xml">
<SubstitutionsFile>..\config\private\WebDav.Substitutions.xml</SubstitutionsFile>
</ConfigFiles>
<ConfigFiles Include="$(OutDir)Services\run\SocketIO.xml">
<SubstitutionsFile>..\config\private\SocketIO.Substitutions.xml</SubstitutionsFile>
</ConfigFiles>
<ConfigFiles Include="$(OutDir)Services\run\SsoAuth.xml">
<SubstitutionsFile>..\config\private\SsoAuth.Substitutions.xml</SubstitutionsFile>
</ConfigFiles>
<ConfigFiles Include="$(OutDir)Services\run\Thumb.xml">
<SubstitutionsFile>..\config\private\Thumb.Substitutions.xml</SubstitutionsFile>
</ConfigFiles>
<ConfigFiles Include="$(OutDir)Services\run\UrlShortener.xml">
<SubstitutionsFile>..\config\private\UrlShortener.Substitutions.xml</SubstitutionsFile>
</ConfigFiles>
<ConfigFiles Include="$(OutDir)Services\MailAggregator\ASC.Mail.Aggregator.CollectionService.exe.config" Condition="'$(MailTask)' == '1'">
<SubstitutionsFile>..\config\private\Mail.Agg.Substitutions.xml</SubstitutionsFile>
</ConfigFiles>

View File

@ -155,6 +155,7 @@ BEGIN
start transaction;
insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_AlgerianDinar', 'DZD', 'د.ج', 'DZ', 0, 0);
insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_AngolanKwanza', 'AOA', 'Kz', 'AO', 0, 0);
insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_ArgentinianPeso', 'ARS', '$a', 'AR', 1, 0);
insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_ArmenianDram', 'AMD', 'dram', 'AM', 0, 0);
insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_AustralianDollar', 'AUD', 'A$', 'AU', 1, 1);
@ -186,8 +187,8 @@ BEGIN
insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_KazakhstaniTenge', 'KZT', 'тңг', 'KZ', 0, 0);
insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_KenyanShilling', 'KES', 'KSh', 'KE', 1, 0);
insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_KuwaitiDinar', 'KWD', 'K.D.', 'KW', 1, 0);
insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_LatvianLats', 'LVL', 'Ls', 'LV', 1, 0);
insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_LithuanianLitas', 'LTL', 'Lt', 'LT', 1, 0);
insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_LatvianLats', 'LVL', 'Ls', 'LV', 0, 0);
insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_LithuanianLitas', 'LTL', 'Lt', 'LT', 0, 0);
insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_MalagasyAriary', 'MGA', 'Ar', 'MG', 1, 0);
insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_MalaysianRinggit', 'MYR', 'RM', 'MY', 1, 0);
insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_MauritianRupee', 'MUR', 'Rs', 'MU', 1, 0);
@ -223,7 +224,8 @@ BEGIN
insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_UnitedArabEmiratesDirham', 'AED', 'د.إ', 'AE', 1, 0);
insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_UnitedStatesDollar', 'USD', '$', 'US', 1, 1);
insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_UzbekistaniSom', 'UZS', 'som', 'UZ', 0, 0);
insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_VenezuelanBolivar', 'VEF', 'Bs.', 'VE', 1, 0);
insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_VenezuelanBolivar', 'VEF', 'Bs.', 'VE', 0, 0);
insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_VenezuelanBolivarSoberano', 'VES', 'Bs.S', 'VE', 1, 0);
insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_VietnameseDong', 'VND', '', 'VN', 1, 0);
insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_WestAfricanFranc', 'XOF', 'franc', 'ML', 1, 0);
commit;
@ -273,7 +275,9 @@ BEGIN
insert into files_converts (input, output) values ('.docx', '.pdf');
insert into files_converts (input, output) values ('.docx', '.rtf');
insert into files_converts (input, output) values ('.docx', '.txt');
insert into files_converts (input, output) values ('.docxf', '.docm');
insert into files_converts (input, output) values ('.docxf', '.docx');
insert into files_converts (input, output) values ('.docxf', '.dotm');
insert into files_converts (input, output) values ('.docxf', '.dotx');
insert into files_converts (input, output) values ('.docxf', '.epub');
insert into files_converts (input, output) values ('.docxf', '.fb2');
@ -318,6 +322,24 @@ BEGIN
insert into files_converts (input, output) values ('.dotx', '.pdf');
insert into files_converts (input, output) values ('.dotx', '.rtf');
insert into files_converts (input, output) values ('.dotx', '.txt');
insert into files_converts (input, output) values ('.dps', '.odp');
insert into files_converts (input, output) values ('.dps', '.otp');
insert into files_converts (input, output) values ('.dps', '.pdf');
insert into files_converts (input, output) values ('.dps', '.potm');
insert into files_converts (input, output) values ('.dps', '.potx');
insert into files_converts (input, output) values ('.dps', '.ppsm');
insert into files_converts (input, output) values ('.dps', '.ppsx');
insert into files_converts (input, output) values ('.dps', '.pptm');
insert into files_converts (input, output) values ('.dps', '.pptx');
insert into files_converts (input, output) values ('.dpt', '.odp');
insert into files_converts (input, output) values ('.dpt', '.otp');
insert into files_converts (input, output) values ('.dpt', '.pdf');
insert into files_converts (input, output) values ('.dpt', '.potm');
insert into files_converts (input, output) values ('.dpt', '.potx');
insert into files_converts (input, output) values ('.dpt', '.ppsm');
insert into files_converts (input, output) values ('.dpt', '.ppsx');
insert into files_converts (input, output) values ('.dpt', '.pptm');
insert into files_converts (input, output) values ('.dpt', '.pptx');
insert into files_converts (input, output) values ('.epub', '.docm');
insert into files_converts (input, output) values ('.epub', '.docx');
insert into files_converts (input, output) values ('.epub', '.dotm');
@ -329,6 +351,22 @@ BEGIN
insert into files_converts (input, output) values ('.epub', '.pdf');
insert into files_converts (input, output) values ('.epub', '.rtf');
insert into files_converts (input, output) values ('.epub', '.txt');
insert into files_converts (input, output) values ('.et', '.csv');
insert into files_converts (input, output) values ('.et', '.ods');
insert into files_converts (input, output) values ('.et', '.ots');
insert into files_converts (input, output) values ('.et', '.pdf');
insert into files_converts (input, output) values ('.et', '.xlsm');
insert into files_converts (input, output) values ('.et', '.xlsx');
insert into files_converts (input, output) values ('.et', '.xltm');
insert into files_converts (input, output) values ('.et', '.xltx');
insert into files_converts (input, output) values ('.ett', '.csv');
insert into files_converts (input, output) values ('.ett', '.ods');
insert into files_converts (input, output) values ('.ett', '.ots');
insert into files_converts (input, output) values ('.ett', '.pdf');
insert into files_converts (input, output) values ('.ett', '.xlsm');
insert into files_converts (input, output) values ('.ett', '.xlsx');
insert into files_converts (input, output) values ('.ett', '.xltm');
insert into files_converts (input, output) values ('.ett', '.xltx');
insert into files_converts (input, output) values ('.fb2', '.docm');
insert into files_converts (input, output) values ('.fb2', '.docx');
insert into files_converts (input, output) values ('.fb2', '.dotm');
@ -345,6 +383,8 @@ BEGIN
insert into files_converts (input, output) values ('.fodp', '.pdf');
insert into files_converts (input, output) values ('.fodp', '.potm');
insert into files_converts (input, output) values ('.fodp', '.potx');
insert into files_converts (input, output) values ('.fodp', '.ppsm');
insert into files_converts (input, output) values ('.fodp', '.ppsx');
insert into files_converts (input, output) values ('.fodp', '.pptm');
insert into files_converts (input, output) values ('.fodp', '.pptx');
insert into files_converts (input, output) values ('.fods', '.csv');
@ -367,6 +407,18 @@ BEGIN
insert into files_converts (input, output) values ('.fodt', '.pdf');
insert into files_converts (input, output) values ('.fodt', '.rtf');
insert into files_converts (input, output) values ('.fodt', '.txt');
insert into files_converts (input, output) values ('.htm', '.docm');
insert into files_converts (input, output) values ('.htm', '.docx');
insert into files_converts (input, output) values ('.htm', '.dotm');
insert into files_converts (input, output) values ('.htm', '.dotx');
insert into files_converts (input, output) values ('.htm', '.epub');
insert into files_converts (input, output) values ('.htm', '.fb2');
insert into files_converts (input, output) values ('.htm', '.html');
insert into files_converts (input, output) values ('.htm', '.odt');
insert into files_converts (input, output) values ('.htm', '.ott');
insert into files_converts (input, output) values ('.htm', '.pdf');
insert into files_converts (input, output) values ('.htm', '.rtf');
insert into files_converts (input, output) values ('.htm', '.txt');
insert into files_converts (input, output) values ('.html', '.docm');
insert into files_converts (input, output) values ('.html', '.docx');
insert into files_converts (input, output) values ('.html', '.dotm');
@ -384,21 +436,38 @@ BEGIN
insert into files_converts (input, output) values ('.mht', '.dotx');
insert into files_converts (input, output) values ('.mht', '.epub');
insert into files_converts (input, output) values ('.mht', '.fb2');
insert into files_converts (input, output) values ('.mht', '.html');
insert into files_converts (input, output) values ('.mht', '.odt');
insert into files_converts (input, output) values ('.mht', '.ott');
insert into files_converts (input, output) values ('.mht', '.pdf');
insert into files_converts (input, output) values ('.mht', '.rtf');
insert into files_converts (input, output) values ('.mht', '.txt');
insert into files_converts (input, output) values ('.mhtml', '.docm');
insert into files_converts (input, output) values ('.mhtml', '.docx');
insert into files_converts (input, output) values ('.mhtml', '.dotm');
insert into files_converts (input, output) values ('.mhtml', '.dotx');
insert into files_converts (input, output) values ('.mhtml', '.epub');
insert into files_converts (input, output) values ('.mhtml', '.fb2');
insert into files_converts (input, output) values ('.mhtml', '.html');
insert into files_converts (input, output) values ('.mhtml', '.odt');
insert into files_converts (input, output) values ('.mhtml', '.ott');
insert into files_converts (input, output) values ('.mhtml', '.pdf');
insert into files_converts (input, output) values ('.mhtml', '.rtf');
insert into files_converts (input, output) values ('.mhtml', '.txt');
insert into files_converts (input, output) values ('.odp', '.otp');
insert into files_converts (input, output) values ('.odp', '.pdf');
insert into files_converts (input, output) values ('.odp', '.potm');
insert into files_converts (input, output) values ('.odp', '.potx');
insert into files_converts (input, output) values ('.odp', '.ppsm');
insert into files_converts (input, output) values ('.odp', '.ppsx');
insert into files_converts (input, output) values ('.odp', '.pptm');
insert into files_converts (input, output) values ('.odp', '.pptx');
insert into files_converts (input, output) values ('.otp', '.odp');
insert into files_converts (input, output) values ('.otp', '.pdf');
insert into files_converts (input, output) values ('.otp', '.potm');
insert into files_converts (input, output) values ('.otp', '.potx');
insert into files_converts (input, output) values ('.otp', '.ppsm');
insert into files_converts (input, output) values ('.otp', '.ppsx');
insert into files_converts (input, output) values ('.otp', '.pptm');
insert into files_converts (input, output) values ('.otp', '.pptx');
insert into files_converts (input, output) values ('.ods', '.csv');
@ -437,24 +506,52 @@ BEGIN
insert into files_converts (input, output) values ('.ott', '.pdf');
insert into files_converts (input, output) values ('.ott', '.rtf');
insert into files_converts (input, output) values ('.ott', '.txt');
insert into files_converts (input, output) values ('.oxps', '.docm');
insert into files_converts (input, output) values ('.oxps', '.docx');
insert into files_converts (input, output) values ('.oxps', '.dotm');
insert into files_converts (input, output) values ('.oxps', '.dotx');
insert into files_converts (input, output) values ('.oxps', '.epub');
insert into files_converts (input, output) values ('.oxps', '.fb2');
insert into files_converts (input, output) values ('.oxps', '.html');
insert into files_converts (input, output) values ('.oxps', '.odt');
insert into files_converts (input, output) values ('.oxps', '.ott');
insert into files_converts (input, output) values ('.oxps', '.pdf');
insert into files_converts (input, output) values ('.oxps', '.rtf');
insert into files_converts (input, output) values ('.oxps', '.txt');
insert into files_converts (input, output) values ('.pdf', '.docm');
insert into files_converts (input, output) values ('.pdf', '.docx');
insert into files_converts (input, output) values ('.pdf', '.dotm');
insert into files_converts (input, output) values ('.pdf', '.dotx');
insert into files_converts (input, output) values ('.pdf', '.epub');
insert into files_converts (input, output) values ('.pdf', '.fb2');
insert into files_converts (input, output) values ('.pdf', '.html');
insert into files_converts (input, output) values ('.pdf', '.odt');
insert into files_converts (input, output) values ('.pdf', '.ott');
insert into files_converts (input, output) values ('.pdf', '.rtf');
insert into files_converts (input, output) values ('.pdf', '.txt');
insert into files_converts (input, output) values ('.pot', '.odp');
insert into files_converts (input, output) values ('.pot', '.otp');
insert into files_converts (input, output) values ('.pot', '.pdf');
insert into files_converts (input, output) values ('.pot', '.pptm');
insert into files_converts (input, output) values ('.pot', '.pptx');
insert into files_converts (input, output) values ('.pot', '.potm');
insert into files_converts (input, output) values ('.pot', '.potx');
insert into files_converts (input, output) values ('.pot', '.ppsm');
insert into files_converts (input, output) values ('.pot', '.ppsx');
insert into files_converts (input, output) values ('.pot', '.pptm');
insert into files_converts (input, output) values ('.pot', '.pptx');
insert into files_converts (input, output) values ('.potm', '.odp');
insert into files_converts (input, output) values ('.potm', '.otp');
insert into files_converts (input, output) values ('.potm', '.pdf');
insert into files_converts (input, output) values ('.potm', '.potx');
insert into files_converts (input, output) values ('.potm', '.ppsm');
insert into files_converts (input, output) values ('.potm', '.ppsx');
insert into files_converts (input, output) values ('.potm', '.pptm');
insert into files_converts (input, output) values ('.potm', '.pptx');
insert into files_converts (input, output) values ('.potx', '.odp');
insert into files_converts (input, output) values ('.potx', '.otp');
insert into files_converts (input, output) values ('.potx', '.pdf');
insert into files_converts (input, output) values ('.potx', '.potm');
insert into files_converts (input, output) values ('.potx', '.ppsm');
insert into files_converts (input, output) values ('.potx', '.ppsx');
insert into files_converts (input, output) values ('.potx', '.pptm');
insert into files_converts (input, output) values ('.potx', '.pptx');
insert into files_converts (input, output) values ('.pps', '.odp');
@ -462,6 +559,8 @@ BEGIN
insert into files_converts (input, output) values ('.pps', '.pdf');
insert into files_converts (input, output) values ('.pps', '.potm');
insert into files_converts (input, output) values ('.pps', '.potx');
insert into files_converts (input, output) values ('.pps', '.ppsm');
insert into files_converts (input, output) values ('.pps', '.ppsx');
insert into files_converts (input, output) values ('.pps', '.pptm');
insert into files_converts (input, output) values ('.pps', '.pptx');
insert into files_converts (input, output) values ('.ppsm', '.odp');
@ -469,6 +568,7 @@ BEGIN
insert into files_converts (input, output) values ('.ppsm', '.pdf');
insert into files_converts (input, output) values ('.ppsm', '.potm');
insert into files_converts (input, output) values ('.ppsm', '.potx');
insert into files_converts (input, output) values ('.ppsm', '.ppsx');
insert into files_converts (input, output) values ('.ppsm', '.pptm');
insert into files_converts (input, output) values ('.ppsm', '.pptx');
insert into files_converts (input, output) values ('.ppsx', '.odp');
@ -476,6 +576,7 @@ BEGIN
insert into files_converts (input, output) values ('.ppsx', '.pdf');
insert into files_converts (input, output) values ('.ppsx', '.potm');
insert into files_converts (input, output) values ('.ppsx', '.potx');
insert into files_converts (input, output) values ('.ppsx', '.ppsm');
insert into files_converts (input, output) values ('.ppsx', '.pptm');
insert into files_converts (input, output) values ('.ppsx', '.pptx');
insert into files_converts (input, output) values ('.ppt', '.odp');
@ -483,6 +584,8 @@ BEGIN
insert into files_converts (input, output) values ('.ppt', '.pdf');
insert into files_converts (input, output) values ('.ppt', '.potm');
insert into files_converts (input, output) values ('.ppt', '.potx');
insert into files_converts (input, output) values ('.ppt', '.ppsm');
insert into files_converts (input, output) values ('.ppt', '.ppsx');
insert into files_converts (input, output) values ('.ppt', '.pptm');
insert into files_converts (input, output) values ('.ppt', '.pptx');
insert into files_converts (input, output) values ('.pptm', '.odp');
@ -490,6 +593,8 @@ BEGIN
insert into files_converts (input, output) values ('.pptm', '.pdf');
insert into files_converts (input, output) values ('.pptm', '.potm');
insert into files_converts (input, output) values ('.pptm', '.potx');
insert into files_converts (input, output) values ('.pptm', '.ppsm');
insert into files_converts (input, output) values ('.pptm', '.ppsx');
insert into files_converts (input, output) values ('.pptm', '.pptx');
insert into files_converts (input, output) values ('.pptt', '.pptx');
insert into files_converts (input, output) values ('.pptx', '.odp');
@ -497,6 +602,8 @@ BEGIN
insert into files_converts (input, output) values ('.pptx', '.pdf');
insert into files_converts (input, output) values ('.pptx', '.potm');
insert into files_converts (input, output) values ('.pptx', '.potx');
insert into files_converts (input, output) values ('.pptx', '.ppsm');
insert into files_converts (input, output) values ('.pptx', '.ppsx');
insert into files_converts (input, output) values ('.pptx', '.pptm');
insert into files_converts (input, output) values ('.rtf', '.docm');
insert into files_converts (input, output) values ('.rtf', '.docx');
@ -509,6 +616,47 @@ BEGIN
insert into files_converts (input, output) values ('.rtf', '.ott');
insert into files_converts (input, output) values ('.rtf', '.pdf');
insert into files_converts (input, output) values ('.rtf', '.txt');
insert into files_converts (input, output) values ('.stw', '.docm');
insert into files_converts (input, output) values ('.stw', '.docx');
insert into files_converts (input, output) values ('.stw', '.dotm');
insert into files_converts (input, output) values ('.stw', '.dotx');
insert into files_converts (input, output) values ('.stw', '.epub');
insert into files_converts (input, output) values ('.stw', '.fb2');
insert into files_converts (input, output) values ('.stw', '.html');
insert into files_converts (input, output) values ('.stw', '.odt');
insert into files_converts (input, output) values ('.stw', '.ott');
insert into files_converts (input, output) values ('.stw', '.pdf');
insert into files_converts (input, output) values ('.stw', '.rtf');
insert into files_converts (input, output) values ('.stw', '.txt');
insert into files_converts (input, output) values ('.sxc', '.csv');
insert into files_converts (input, output) values ('.sxc', '.ods');
insert into files_converts (input, output) values ('.sxc', '.ots');
insert into files_converts (input, output) values ('.sxc', '.pdf');
insert into files_converts (input, output) values ('.sxc', '.xlsm');
insert into files_converts (input, output) values ('.sxc', '.xlsx');
insert into files_converts (input, output) values ('.sxc', '.xltm');
insert into files_converts (input, output) values ('.sxc', '.xltx');
insert into files_converts (input, output) values ('.sxi', '.odp');
insert into files_converts (input, output) values ('.sxi', '.otp');
insert into files_converts (input, output) values ('.sxi', '.pdf');
insert into files_converts (input, output) values ('.sxi', '.potm');
insert into files_converts (input, output) values ('.sxi', '.potx');
insert into files_converts (input, output) values ('.sxi', '.ppsm');
insert into files_converts (input, output) values ('.sxi', '.ppsx');
insert into files_converts (input, output) values ('.sxi', '.pptm');
insert into files_converts (input, output) values ('.sxi', '.pptx');
insert into files_converts (input, output) values ('.sxw', '.docm');
insert into files_converts (input, output) values ('.sxw', '.docx');
insert into files_converts (input, output) values ('.sxw', '.dotm');
insert into files_converts (input, output) values ('.sxw', '.dotx');
insert into files_converts (input, output) values ('.sxw', '.epub');
insert into files_converts (input, output) values ('.sxw', '.fb2');
insert into files_converts (input, output) values ('.sxw', '.html');
insert into files_converts (input, output) values ('.sxw', '.odt');
insert into files_converts (input, output) values ('.sxw', '.ott');
insert into files_converts (input, output) values ('.sxw', '.pdf');
insert into files_converts (input, output) values ('.sxw', '.rtf');
insert into files_converts (input, output) values ('.sxw', '.txt');
insert into files_converts (input, output) values ('.txt', '.docm');
insert into files_converts (input, output) values ('.txt', '.docx');
insert into files_converts (input, output) values ('.txt', '.dotm');
@ -520,6 +668,30 @@ BEGIN
insert into files_converts (input, output) values ('.txt', '.ott');
insert into files_converts (input, output) values ('.txt', '.pdf');
insert into files_converts (input, output) values ('.txt', '.rtf');
insert into files_converts (input, output) values ('.wps', '.docm');
insert into files_converts (input, output) values ('.wps', '.docx');
insert into files_converts (input, output) values ('.wps', '.dotm');
insert into files_converts (input, output) values ('.wps', '.dotx');
insert into files_converts (input, output) values ('.wps', '.epub');
insert into files_converts (input, output) values ('.wps', '.fb2');
insert into files_converts (input, output) values ('.wps', '.html');
insert into files_converts (input, output) values ('.wps', '.odt');
insert into files_converts (input, output) values ('.wps', '.ott');
insert into files_converts (input, output) values ('.wps', '.pdf');
insert into files_converts (input, output) values ('.wps', '.rtf');
insert into files_converts (input, output) values ('.wps', '.txt');
insert into files_converts (input, output) values ('.wpt', '.docm');
insert into files_converts (input, output) values ('.wpt', '.docx');
insert into files_converts (input, output) values ('.wpt', '.dotm');
insert into files_converts (input, output) values ('.wpt', '.dotx');
insert into files_converts (input, output) values ('.wpt', '.epub');
insert into files_converts (input, output) values ('.wpt', '.fb2');
insert into files_converts (input, output) values ('.wpt', '.html');
insert into files_converts (input, output) values ('.wpt', '.odt');
insert into files_converts (input, output) values ('.wpt', '.ott');
insert into files_converts (input, output) values ('.wpt', '.pdf');
insert into files_converts (input, output) values ('.wpt', '.rtf');
insert into files_converts (input, output) values ('.wpt', '.txt');
insert into files_converts (input, output) values ('.xls', '.csv');
insert into files_converts (input, output) values ('.xls', '.ods');
insert into files_converts (input, output) values ('.xls', '.ots');
@ -536,6 +708,14 @@ BEGIN
insert into files_converts (input, output) values ('.xlsm', '.xltm');
insert into files_converts (input, output) values ('.xlsm', '.xltx');
insert into files_converts (input, output) values ('.xlst', '.xlsx');
insert into files_converts (input, output) values ('.xlsb', '.csv');
insert into files_converts (input, output) values ('.xlsb', '.ods');
insert into files_converts (input, output) values ('.xlsb', '.ots');
insert into files_converts (input, output) values ('.xlsb', '.pdf');
insert into files_converts (input, output) values ('.xlsb', '.xlsm');
insert into files_converts (input, output) values ('.xlsb', '.xlsx');
insert into files_converts (input, output) values ('.xlsb', '.xltm');
insert into files_converts (input, output) values ('.xlsb', '.xltx');
insert into files_converts (input, output) values ('.xlsx', '.csv');
insert into files_converts (input, output) values ('.xlsx', '.ods');
insert into files_converts (input, output) values ('.xlsx', '.ots');
@ -577,7 +757,18 @@ BEGIN
insert into files_converts (input, output) values ('.xml', '.pdf');
insert into files_converts (input, output) values ('.xml', '.rtf');
insert into files_converts (input, output) values ('.xml', '.txt');
insert into files_converts (input, output) values ('.xps', '.docm');
insert into files_converts (input, output) values ('.xps', '.docx');
insert into files_converts (input, output) values ('.xps', '.dotm');
insert into files_converts (input, output) values ('.xps', '.dotx');
insert into files_converts (input, output) values ('.xps', '.epub');
insert into files_converts (input, output) values ('.xps', '.fb2');
insert into files_converts (input, output) values ('.xps', '.html');
insert into files_converts (input, output) values ('.xps', '.odt');
insert into files_converts (input, output) values ('.xps', '.ott');
insert into files_converts (input, output) values ('.xps', '.pdf');
insert into files_converts (input, output) values ('.xps', '.rtf');
insert into files_converts (input, output) values ('.xps', '.txt');
commit;
start transaction;

View File

@ -37,6 +37,7 @@ CREATE TABLE IF NOT EXISTS `backup_backup` (
`expires_on` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
`storage_params` TEXT NULL,
`hash` char(64) NOT NULL,
`removed` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `tenant_id` (`tenant_id`),
KEY `expires_on` (`expires_on`),
@ -349,7 +350,6 @@ CREATE TABLE IF NOT EXISTS `core_user` (
`workfromdate` datetime DEFAULT NULL,
`terminateddate` datetime DEFAULT NULL,
`title` varchar(64) DEFAULT NULL,
`department` varchar(128) DEFAULT NULL,
`culture` varchar(20) DEFAULT NULL,
`contacts` varchar(1024) DEFAULT NULL,
`phone` varchar(255) DEFAULT NULL,
@ -362,6 +362,7 @@ CREATE TABLE IF NOT EXISTS `core_user` (
`removed` int(11) NOT NULL DEFAULT '0',
`create_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`last_modified` datetime NOT NULL,
`user_lead` VARCHAR(36) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `last_modified` (`last_modified`),
KEY `username` (`tenant`,`username`),
@ -944,8 +945,10 @@ CREATE TABLE IF NOT EXISTS `feed_readed` (
CREATE TABLE IF NOT EXISTS `feed_users` (
`feed_id` varchar(88) NOT NULL,
`user_id` char(38) NOT NULL,
`aggregated_date` datetime DEFAULT NULL,
PRIMARY KEY (`feed_id`,`user_id`),
KEY `user_id` (`user_id`)
KEY `user_id` (`user_id`),
KEY `aggregated_date` (`aggregated_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `files_bunch_objects` (
@ -1035,9 +1038,11 @@ CREATE TABLE IF NOT EXISTS `files_security` (
`entry_id` varchar(50) NOT NULL,
`entry_type` int(10) NOT NULL,
`subject` char(38) NOT NULL,
`subject_type` tinyint(1) UNSIGNED NOT NULL,
`owner` char(38) NOT NULL,
`security` int(11) NOT NULL,
`timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`options` TEXT NULL,
PRIMARY KEY (`tenant_id`,`entry_id`,`entry_type`,`subject`),
KEY `owner` (`owner`),
KEY `tenant_id` (`tenant_id`,`entry_type`,`entry_id`,`owner`)
@ -1305,8 +1310,10 @@ CREATE TABLE IF NOT EXISTS `jabber_offmessage` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`jid` varchar(255) NOT NULL,
`message` mediumtext,
`stamp` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `jabber_offmessage_jid` (`jid`)
KEY `jabber_offmessage_jid` (`jid`),
KEY `jabber_offmessage_stamp` (`stamp`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `jabber_offpresence` (
@ -2277,6 +2284,7 @@ CREATE TABLE IF NOT EXISTS `tenants_iprestrictions` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`tenant` int(10) NOT NULL,
`ip` varchar(50) NOT NULL,
`for_admin` TINYINT(1) NOT NULL,
PRIMARY KEY (`id`),
KEY `tenant` (`tenant`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
@ -2309,7 +2317,8 @@ CREATE TABLE IF NOT EXISTS `tenants_quotarow` (
`counter` bigint(20) NOT NULL DEFAULT '0',
`tag` varchar(1024) DEFAULT NULL,
`last_modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`tenant`,`path`),
`user_id` varchar(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
PRIMARY KEY (`tenant`,`path`,`user_id`),
KEY `last_modified` (`last_modified`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

View File

@ -21,12 +21,19 @@ BEGIN
IF NOT EXISTS(SELECT * FROM information_schema.`TABLES` WHERE `TABLE_SCHEMA` = DATABASE() AND `TABLE_NAME` = 'jabber_offmessage' AND `TABLE_COLLATION` = 'utf8mb4_general_ci') THEN
RENAME TABLE jabber_offmessage TO jabber_offmessage_old;
IF NOT EXISTS(SELECT * FROM information_schema.`COLUMNS` WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'jabber_offmessage_old' AND COLUMN_NAME = 'stamp') THEN
ALTER TABLE `jabber_offmessage_old` ADD COLUMN `stamp` DATETIME NULL AFTER `message`, ADD INDEX `jabber_offmessage_stamp` (`stamp`);
END IF;
CREATE TABLE `jabber_offmessage` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`jid` VARCHAR(255) NOT NULL,
`message` MEDIUMTEXT NULL DEFAULT NULL,
`stamp` datetime NOT NULL,
PRIMARY KEY (`id`),
INDEX `jabber_offmessage_jid` (`jid`(190))
INDEX `jabber_offmessage_jid` (`jid`(190)),
INDEX `jabber_offmessage_stamp` (`stamp`)
)
COLLATE='utf8mb4_general_ci';
INSERT INTO jabber_offmessage SELECT * FROM jabber_offmessage_old;

View File

@ -0,0 +1,247 @@
DELIMITER DLM00
DROP PROCEDURE IF EXISTS upgrade125 DLM00
CREATE PROCEDURE upgrade125()
BEGIN
IF NOT EXISTS(SELECT * FROM information_schema.`COLUMNS` WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'tenants_iprestrictions' AND COLUMN_NAME = 'for_admin') THEN
ALTER TABLE `tenants_iprestrictions` ADD COLUMN `for_admin` TINYINT(1) NOT NULL AFTER `ip`;
END IF;
IF NOT EXISTS(SELECT * FROM information_schema.`COLUMNS` WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'feed_users' AND COLUMN_NAME = 'aggregated_date') THEN
ALTER TABLE `feed_users` ADD COLUMN `aggregated_date` DATETIME NULL AFTER `user_id`;
ALTER TABLE `feed_users` ADD INDEX `aggregated_date` (`aggregated_date`);
UPDATE feed_users fu
INNER JOIN feed_aggregate fa ON fu.feed_id = fa.id
SET fu.aggregated_date = fa.aggregated_date;
END IF;
IF NOT EXISTS(SELECT * FROM information_schema.`COLUMNS` WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'files_security' AND COLUMN_NAME = 'subject_type') THEN
ALTER TABLE `files_security` ADD COLUMN `subject_type` TINYINT UNSIGNED NOT NULL AFTER `subject`, ADD COLUMN `options` TEXT NULL AFTER `timestamp`;
UPDATE files_security SET subject_type=1 WHERE subject='d77bd6af-828b-41f5-84ed-7ffe2565b13a';
UPDATE files_security SET subject_type=2 WHERE subject='ee7a7468-cda5-4f8b-afdb-f4e42c318eb6' or subject='aafd9c26-9686-4996-9665-35ca72721c4c';
END IF;
IF NOT EXISTS(SELECT * FROM information_schema.`COLUMNS` WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'core_user' AND COLUMN_NAME = 'user_lead') THEN
ALTER TABLE `core_user` ADD COLUMN `user_lead` VARCHAR(36) NULL AFTER `last_modified`;
END IF;
IF EXISTS(SELECT * FROM information_schema.`COLUMNS` WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'core_user' AND COLUMN_NAME = 'department') THEN
ALTER TABLE `core_user` DROP COLUMN `department`;
END IF;
IF NOT EXISTS(SELECT * FROM information_schema.`COLUMNS` WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'tenants_quotarow' AND COLUMN_NAME = 'user_id') THEN
ALTER TABLE `tenants_quotarow` ADD COLUMN `user_id` VARCHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000' AFTER `last_modified`, DROP PRIMARY KEY, ADD PRIMARY KEY (`tenant`, `path`, `user_id`);
END IF;
IF NOT EXISTS(SELECT * FROM information_schema.`COLUMNS` WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'jabber_offmessage' AND COLUMN_NAME = 'stamp') THEN
ALTER TABLE `jabber_offmessage` ADD COLUMN `stamp` DATETIME NULL AFTER `message`, ADD INDEX `jabber_offmessage_stamp` (`stamp`);
END IF;
IF NOT EXISTS(SELECT * FROM information_schema.`COLUMNS` WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'backup_backup' AND COLUMN_NAME = 'removed') THEN
ALTER TABLE `backup_backup` ADD COLUMN `removed` tinyint(1) NOT NULL DEFAULT '0' AFTER `hash`;
END IF;
UPDATE `crm_currency_info` SET `is_convertable` = 0 WHERE `abbreviation` IN ('LTL', 'LVL', 'VEF');
INSERT IGNORE INTO `crm_currency_info` (`resource_key`, `abbreviation`, `symbol`, `culture_name`, `is_convertable`, `is_basic`) values ('Currency_AngolanKwanza', 'AOA', 'Kz', 'AO', 0, 0);
INSERT IGNORE INTO `crm_currency_info` (`resource_key`, `abbreviation`, `symbol`, `culture_name`, `is_convertable`, `is_basic`) values ('Currency_VenezuelanBolivarSoberano', 'VES', 'Bs.S', 'VE', 1, 0);
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.docxf', '.docm');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.docxf', '.dotm');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.dps', '.odp');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.dps', '.otp');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.dps', '.pdf');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.dps', '.potm');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.dps', '.potx');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.dps', '.ppsm');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.dps', '.ppsx');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.dps', '.pptm');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.dps', '.pptx');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.dpt', '.odp');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.dpt', '.otp');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.dpt', '.pdf');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.dpt', '.potm');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.dpt', '.potx');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.dpt', '.ppsm');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.dpt', '.ppsx');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.dpt', '.pptm');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.dpt', '.pptx');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.et', '.csv');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.et', '.ods');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.et', '.ots');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.et', '.pdf');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.et', '.xlsm');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.et', '.xlsx');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.et', '.xltm');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.et', '.xltx');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.ett', '.csv');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.ett', '.ods');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.ett', '.ots');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.ett', '.pdf');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.ett', '.xlsm');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.ett', '.xlsx');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.ett', '.xltm');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.ett', '.xltx');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.fodp', '.ppsm');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.fodp', '.ppsx');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.htm', '.docm');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.htm', '.docx');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.htm', '.dotm');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.htm', '.dotx');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.htm', '.epub');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.htm', '.fb2');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.htm', '.html');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.htm', '.odt');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.htm', '.ott');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.htm', '.pdf');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.htm', '.rtf');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.htm', '.txt');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.mht', '.html');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.mhtml', '.docm');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.mhtml', '.docx');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.mhtml', '.dotm');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.mhtml', '.dotx');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.mhtml', '.epub');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.mhtml', '.fb2');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.mhtml', '.html');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.mhtml', '.odt');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.mhtml', '.ott');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.mhtml', '.pdf');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.mhtml', '.rtf');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.mhtml', '.txt');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.odp', '.ppsm');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.odp', '.ppsx');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.otp', '.ppsm');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.otp', '.ppsx');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.oxps', '.docm');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.oxps', '.docx');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.oxps', '.dotm');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.oxps', '.dotx');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.oxps', '.epub');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.oxps', '.fb2');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.oxps', '.html');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.oxps', '.odt');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.oxps', '.ott');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.oxps', '.rtf');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.oxps', '.txt');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.pdf', '.docm');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.pdf', '.docx');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.pdf', '.dotm');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.pdf', '.dotx');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.pdf', '.epub');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.pdf', '.fb2');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.pdf', '.html');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.pdf', '.odt');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.pdf', '.ott');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.pdf', '.rtf');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.pdf', '.txt');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.pot', '.ppsm');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.pot', '.ppsx');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.potm', '.ppsm');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.potm', '.ppsx');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.potx', '.ppsm');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.potx', '.ppsx');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.pps', '.ppsm');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.pps', '.ppsx');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.ppsm', '.ppsx');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.ppsx', '.ppsm');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.ppt', '.ppsm');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.ppt', '.ppsx');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.pptm', '.ppsm');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.pptm', '.ppsx');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.pptx', '.ppsm');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.pptx', '.ppsx');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.stw', '.docm');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.stw', '.docx');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.stw', '.dotm');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.stw', '.dotx');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.stw', '.epub');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.stw', '.fb2');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.stw', '.html');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.stw', '.odt');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.stw', '.ott');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.stw', '.pdf');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.stw', '.rtf');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.stw', '.txt');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.sxc', '.csv');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.sxc', '.ods');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.sxc', '.ots');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.sxc', '.pdf');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.sxc', '.xlsm');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.sxc', '.xlsx');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.sxc', '.xltm');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.sxc', '.xltx');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.sxi', '.odp');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.sxi', '.otp');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.sxi', '.pdf');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.sxi', '.potm');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.sxi', '.potx');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.sxi', '.ppsm');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.sxi', '.ppsx');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.sxi', '.pptm');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.sxi', '.pptx');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.sxw', '.docm');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.sxw', '.docx');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.sxw', '.dotm');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.sxw', '.dotx');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.sxw', '.epub');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.sxw', '.fb2');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.sxw', '.html');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.sxw', '.odt');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.sxw', '.ott');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.sxw', '.pdf');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.sxw', '.rtf');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.sxw', '.txt');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.wps', '.docm');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.wps', '.docx');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.wps', '.dotm');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.wps', '.dotx');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.wps', '.epub');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.wps', '.fb2');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.wps', '.html');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.wps', '.odt');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.wps', '.ott');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.wps', '.pdf');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.wps', '.rtf');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.wps', '.txt');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.wpt', '.docm');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.wpt', '.docx');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.wpt', '.dotm');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.wpt', '.dotx');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.wpt', '.epub');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.wpt', '.fb2');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.wpt', '.html');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.wpt', '.odt');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.wpt', '.ott');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.wpt', '.pdf');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.wpt', '.rtf');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.wpt', '.txt');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.xlsb', '.csv');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.xlsb', '.ods');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.xlsb', '.ots');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.xlsb', '.pdf');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.xlsb', '.xlsm');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.xlsb', '.xlsx');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.xlsb', '.xltm');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.xlsb', '.xltx');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.xps', '.docm');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.xps', '.docx');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.xps', '.dotm');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.xps', '.dotx');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.xps', '.epub');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.xps', '.fb2');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.xps', '.html');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.xps', '.odt');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.xps', '.ott');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.xps', '.rtf');
INSERT IGNORE INTO `files_converts` (`input`, `output`) VALUES ('.xps', '.txt');
END DLM00
CALL upgrade125() DLM00
DELIMITER ;

View File

@ -1,20 +1,20 @@
/*
*
* (c) Copyright Ascensio System Limited 2010-2021
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
*
* (c) Copyright Ascensio System Limited 2010-2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
using System;
using ASC.ActiveDirectory.Base.Data;
using ASC.Core.Users;

View File

@ -1,20 +1,20 @@
/*
*
* (c) Copyright Ascensio System Limited 2010-2021
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
*
* (c) Copyright Ascensio System Limited 2010-2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
using ASC.ActiveDirectory.Base.Expressions;
using NUnit.Framework;

View File

@ -1,20 +1,20 @@
/*
*
* (c) Copyright Ascensio System Limited 2010-2021
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
*
* (c) Copyright Ascensio System Limited 2010-2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
using ASC.ActiveDirectory.Base;
using NUnit.Framework;

View File

@ -21,6 +21,8 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DocumentationFile>..\..\web\studio\ASC.Web.Studio\bin\ASC.ActiveDirectory.xml</DocumentationFile>
<NoWarn>CS1591</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>none</DebugType>
@ -98,5 +100,8 @@
<Version>2.3.8.1</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
<Reference Include="System.Runtime.Serialization" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@ -1,20 +1,20 @@
/*
*
* (c) Copyright Ascensio System Limited 2010-2021
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
*
* (c) Copyright Ascensio System Limited 2010-2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
using System;
using System.Collections.Generic;
using System.Net.Security;
@ -37,30 +37,40 @@ namespace ASC.ActiveDirectory.Base.Data
private volatile string _hash;
private volatile int[] _certificateErrors;
///<example>true</example>
[DataMember]
public bool Approved { get { return _approved; } set { _approved = value; } }
///<example>true</example>
[DataMember]
public bool Requested { get { return _requested; } set { _requested = value; } }
///<example>SerialNumber</example>
[DataMember]
public string SerialNumber { get { return _serialNumber; } set { _serialNumber = value; } }
///<example>IssuerName</example>
[DataMember]
public string IssuerName { get { return _issuerName; } set { _issuerName = value; } }
///<example>SubjectName</example>
[DataMember]
public string SubjectName { get { return _subjectName; } set { _subjectName = value; } }
///<example>2019-07-26T00:00:00</example>
[DataMember]
public DateTime ValidFrom { get; set; }
///<example>2019-07-26T00:00:00</example>
[DataMember]
public DateTime ValidUntil { get; set; }
///<example>Hash</example>
[DataMember]
public string Hash { get { return _hash; } set { _hash = value; } }
///<example type="int">1</example>
///<collection>list</collection>
[DataMember]
public int[] CertificateErrors { get { return _certificateErrors; } set { _certificateErrors = value; } }

View File

@ -1,20 +1,20 @@
/*
*
* (c) Copyright Ascensio System Limited 2010-2021
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
*
* (c) Copyright Ascensio System Limited 2010-2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
using System.Linq;
namespace ASC.ActiveDirectory.Base.Data

View File

@ -1,20 +1,20 @@
/*
*
* (c) Copyright Ascensio System Limited 2010-2021
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
*
* (c) Copyright Ascensio System Limited 2010-2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
using System.Collections.Generic;
namespace ASC.ActiveDirectory.Base.Data
@ -40,6 +40,7 @@ namespace ASC.ActiveDirectory.Base.Data
/// Get property object
/// </summary>
/// <param name="propertyName">property name</param>
/// <param name="getBytes"></param>
/// <returns>value object</returns>
public abstract object GetValue(string propertyName, bool getBytes = false);

View File

@ -1,20 +1,20 @@
/*
*
* (c) Copyright Ascensio System Limited 2010-2021
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
*
* (c) Copyright Ascensio System Limited 2010-2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
using System;
using System.Collections.Generic;
using System.Linq;
@ -111,7 +111,7 @@ namespace ASC.ActiveDirectory.Base.Data
}
}
public static UserInfo ToUserInfo(this LdapObject ldapUser, LdapUserImporter ldapUserImporter, ILog log = null)
public static UserInfo ToUserInfo(this LdapObject ldapUser, LdapUserImporter ldapUserImporter, TenantUserQuotaSettings quotaSettings, ILog log = null)
{
var settings = ldapUserImporter.Settings;
var resource = ldapUserImporter.Resource;
@ -132,6 +132,9 @@ namespace ASC.ActiveDirectory.Base.Data
var emails = ldapUser.GetContacts(Mapping.AdditionalMail, settings, log);
var skype = ldapUser.GetContacts(Mapping.Skype, settings, log);
var quota = settings.LdapMapping.ContainsKey(Mapping.UserQuotaLimit) ?
LdapUtils.ConvertSizeToBytes(GetAttribute(ldapUser, settings.LdapMapping[Mapping.UserQuotaLimit],log)) :
quotaSettings.DefaultUserQuota;
if (string.IsNullOrEmpty(userName))
throw new Exception("LDAP LoginAttribute is empty");
@ -153,7 +156,8 @@ namespace ASC.ActiveDirectory.Base.Data
Title = !string.IsNullOrEmpty(title) ? title : string.Empty,
Location = !string.IsNullOrEmpty(location) ? location : string.Empty,
WorkFromDate = TenantUtil.DateTimeNow(),
Contacts = contacts
Contacts = contacts,
LdapQouta = quota
};
if (!string.IsNullOrEmpty(firstName))

View File

@ -1,20 +1,20 @@
/*
*
* (c) Copyright Ascensio System Limited 2010-2021
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
*
* (c) Copyright Ascensio System Limited 2010-2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
using System;
using System.Collections.Generic;
using System.Linq;
@ -67,7 +67,7 @@ namespace ASC.ActiveDirectory.Base.Expressions
/// Add nested Criteria
/// </summary>
/// <param name="nested"></param>
/// <returns>себя</returns>
/// <returns>Self</returns>
public Criteria Add(Criteria nested)
{
_nestedCriteras.Add(nested);

View File

@ -1,20 +1,20 @@
/*
*
* (c) Copyright Ascensio System Limited 2010-2021
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
*
* (c) Copyright Ascensio System Limited 2010-2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
namespace ASC.ActiveDirectory.Base.Expressions
{
/// <summary>

View File

@ -1,20 +1,20 @@
/*
*
* (c) Copyright Ascensio System Limited 2010-2021
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
*
* (c) Copyright Ascensio System Limited 2010-2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
using System;
using System.Text;
@ -134,8 +134,8 @@ namespace ASC.ActiveDirectory.Base.Expressions
/// Escapes the LDAP search filter to prevent LDAP injection attacks.
/// </summary>
/// <param name="searchFilter">The search filter.</param>
/// <see cref="https://blogs.oracle.com/shankar/entry/what_is_ldap_injection" />
/// <see cref="http://msdn.microsoft.com/en-us/library/aa746475.aspx" />
/// <see href="https://blogs.oracle.com/shankar/entry/what_is_ldap_injection" />
/// <see href="http://msdn.microsoft.com/en-us/library/aa746475.aspx" />
/// <returns>The escaped search filter.</returns>
private static string EscapeLdapSearchFilter(string searchFilter)
{

View File

@ -1,20 +1,20 @@
/*
*
* (c) Copyright Ascensio System Limited 2010-2021
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
*
* (c) Copyright Ascensio System Limited 2010-2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
namespace ASC.ActiveDirectory.Base.Expressions
{
/// <summary>

View File

@ -1,20 +1,20 @@
/*
*
* (c) Copyright Ascensio System Limited 2010-2021
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
*
* (c) Copyright Ascensio System Limited 2010-2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
using System;
namespace ASC.ActiveDirectory.Base

View File

@ -1,20 +1,20 @@
/*
*
* (c) Copyright Ascensio System Limited 2010-2021
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
*
* (c) Copyright Ascensio System Limited 2010-2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
using System;
using System.Collections.Generic;
using System.Linq;

View File

@ -1,20 +1,20 @@
/*
*
* (c) Copyright Ascensio System Limited 2010-2021
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
*
* (c) Copyright Ascensio System Limited 2010-2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
using System;
using ASC.Notify.Model;

View File

@ -1,20 +1,20 @@
/*
*
* (c) Copyright Ascensio System Limited 2010-2021
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
*
* (c) Copyright Ascensio System Limited 2010-2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
using System;
using System.Collections.Generic;
using System.Threading.Tasks;

View File

@ -1,20 +1,20 @@
/*
*
* (c) Copyright Ascensio System Limited 2010-2021
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
*
* (c) Copyright Ascensio System Limited 2010-2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
using System;
using ASC.Core.Tenants;

View File

@ -1,6 +1,6 @@
/*
*
* (c) Copyright Ascensio System Limited 2010-2021
* (c) Copyright Ascensio System Limited 2010-2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -27,6 +27,7 @@ using ASC.ActiveDirectory.Base.Settings;
using ASC.ActiveDirectory.ComplexOperations;
using ASC.Common.Logging;
using ASC.Core;
using ASC.Core.Tenants;
using ASC.Core.Users;
// ReSharper disable RedundantToStringCall
@ -96,8 +97,8 @@ namespace ASC.ActiveDirectory.Base
if (!AllDomainUsers.Any() && !TryLoadLDAPUsers())
return users;
var usersToAdd = AllDomainUsers.Select(ldapObject => ldapObject.ToUserInfo(this, _log));
var quotaSettings = TenantUserQuotaSettings.Load();
var usersToAdd = AllDomainUsers.Select(ldapObject => ldapObject.ToUserInfo(this, quotaSettings, _log));
users.AddRange(usersToAdd);
@ -134,6 +135,7 @@ namespace ASC.ActiveDirectory.Base
_log.DebugFormat("LdapUserImporter.GetGroupUsers(Group name: {0})", groupInfo.Name);
var users = new List<UserInfo>();
var quotaSettings = TenantUserQuotaSettings.Load();
if (!AllDomainGroups.Any() && !TryLoadLDAPGroups())
return users;
@ -182,7 +184,7 @@ namespace ASC.ActiveDirectory.Base
continue;
}
var userInfo = ldapUser.ToUserInfo(this, _log);
var userInfo = ldapUser.ToUserInfo(this, quotaSettings, _log);
if (!users.Exists(u => u.Sid == userInfo.Sid))
users.Add(userInfo);
@ -195,7 +197,7 @@ namespace ASC.ActiveDirectory.Base
foreach (var ldapUser in ldapUsers)
{
var userInfo = ldapUser.ToUserInfo(this, _log);
var userInfo = ldapUser.ToUserInfo(this, quotaSettings, _log);
if (!users.Exists(u => u.Sid == userInfo.Sid))
users.Add(userInfo);
@ -686,6 +688,8 @@ namespace ASC.ActiveDirectory.Base
var searchTerm = exps.Count > 1 ? Criteria.Any(exps.ToArray()).ToString() : exps.First().ToString();
var quotaSettings = TenantUserQuotaSettings.Load();
var users = LdapHelper.GetUsers(searchTerm, !string.IsNullOrEmpty(email) ? -1 : 1)
.Where(user => user != null)
.ToLookup(lu =>
@ -699,7 +703,7 @@ namespace ASC.ActiveDirectory.Base
_ldapDomain = LdapUtils.DistinguishedNameToDomain(lu.DistinguishedName);
}
ui = lu.ToUserInfo(this, _log);
ui = lu.ToUserInfo(this, quotaSettings, _log);
}
catch (Exception ex)
{

View File

@ -1,20 +1,20 @@
/*
*
* (c) Copyright Ascensio System Limited 2010-2021
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
*
* (c) Copyright Ascensio System Limited 2010-2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
using System;
using System.Collections.Generic;
using System.Linq;
@ -29,7 +29,7 @@ using ASC.Web.Core;
namespace ASC.ActiveDirectory.Base.Settings
{
[Serializable]
[DataContract]
[DataContract]
public class LdapSettings : BaseSettings<LdapSettings>, ICloneable
{
public override Guid ID
@ -58,7 +58,9 @@ namespace ASC.ActiveDirectory.Base.Settings
AdditionalPhone,
AdditionalMobilePhone,
AdditionalMail,
Skype
Skype,
UserQuotaLimit
}
public enum AccessRight
@ -92,7 +94,7 @@ namespace ASC.ActiveDirectory.Base.Settings
.Where("IFNULL(JSON_EXTRACT(`Data`, '$.EnableLdapAuthentication'), 'false')", "true")
.Distinct();
using (var dbManager = DbManager.FromHttpContext("default", 180000))
using (var dbManager = new DbManager("default", 180000))
{
return dbManager.ExecuteList(query).ConvertAll(r => Convert.ToInt32(r[0]));
}
@ -216,41 +218,53 @@ namespace ASC.ActiveDirectory.Base.Settings
return MemberwiseClone();
}
///<example>true</example>
[DataMember]
public bool EnableLdapAuthentication { get; set; }
///<example>true</example>
[DataMember]
public bool StartTls { get; set; }
///<example>true</example>
[DataMember]
public bool Ssl { get; set; }
///<example>true</example>
[DataMember]
public bool SendWelcomeEmail { get; set; }
///<example>Server</example>
[DataMember]
public string Server { get; set; }
///<example>UserDN</example>
[DataMember]
// ReSharper disable once InconsistentNaming
public string UserDN { get; set; }
///<example type="int">1</example>
[DataMember]
public int PortNumber { get; set; }
///<example>UserFilter</example>
[DataMember]
public string UserFilter { get; set; }
///<example>LoginAttribute</example>
[DataMember]
public string LoginAttribute { get; set; }
///<example>null</example>
[DataMember]
public Dictionary<MappingFields, string> LdapMapping { get; set; }
//ToDo: use SId instead of group name
///<example>null</example>
[DataMember]
public Dictionary<AccessRight, string> AccessRights { get; set; }
///<example>FirstNameAttribute</example>
[DataMember]
public string FirstNameAttribute
{
@ -265,6 +279,7 @@ namespace ASC.ActiveDirectory.Base.Settings
}
}
///<example>SecondNameAttribute</example>
[DataMember]
public string SecondNameAttribute
{
@ -279,6 +294,7 @@ namespace ASC.ActiveDirectory.Base.Settings
}
}
///<example>MailAttribute</example>
[DataMember]
public string MailAttribute
{
@ -293,6 +309,7 @@ namespace ASC.ActiveDirectory.Base.Settings
}
}
///<example>TitleAttribute</example>
[DataMember]
public string TitleAttribute
{
@ -307,6 +324,7 @@ namespace ASC.ActiveDirectory.Base.Settings
}
}
///<example>MobilePhoneAttribute</example>
[DataMember]
public string MobilePhoneAttribute
{
@ -321,6 +339,7 @@ namespace ASC.ActiveDirectory.Base.Settings
}
}
///<example>LocationAttribute</example>
[DataMember]
public string LocationAttribute
{
@ -335,43 +354,57 @@ namespace ASC.ActiveDirectory.Base.Settings
}
}
///<example>true</example>
[DataMember]
public bool GroupMembership { get; set; }
///<example>GroupDN</example>
[DataMember]
// ReSharper disable once InconsistentNaming
public string GroupDN { get; set; }
///<example>GroupNameAttribute</example>
[DataMember]
public string GroupNameAttribute { get; set; }
///<example>GroupFilter</example>
[DataMember]
public string GroupFilter { get; set; }
///<example>UserAttribute</example>
[DataMember]
public string UserAttribute { get; set; }
///<example>GroupAttribute</example>
[DataMember]
public string GroupAttribute { get; set; }
///<example>true</example>
[DataMember]
public bool Authentication { get; set; }
///<example>Login</example>
[DataMember]
public string Login { get; set; }
///<example>Password</example>
[DataMember]
public string Password { get; set; }
///<example type="int">1</example>
///<collection>list</collection>
[DataMember]
public byte[] PasswordBytes { get; set; }
///<example>true</example>
[DataMember]
public bool IsDefault { get; set; }
///<example>true</example>
[DataMember]
public bool AcceptCertificate { get; set; }
///<example>AcceptCertificateHash</example>
[DataMember]
public string AcceptCertificateHash { get; set; }

View File

@ -1,20 +1,20 @@
/*
*
* (c) Copyright Ascensio System Limited 2010-2021
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
*
* (c) Copyright Ascensio System Limited 2010-2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
using System;
using ASC.Common.Logging;

View File

@ -1,20 +1,20 @@
/*
*
* (c) Copyright Ascensio System Limited 2010-2021
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
*
* (c) Copyright Ascensio System Limited 2010-2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
namespace ASC.ActiveDirectory.Base.Settings
{
public enum LdapSettingsStatus

View File

@ -1,20 +1,20 @@
/*
*
* (c) Copyright Ascensio System Limited 2010-2021
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
*
* (c) Copyright Ascensio System Limited 2010-2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
using ASC.ActiveDirectory.DirectoryServices;
using ASC.ActiveDirectory.Expressions;
using ASC.Security.Cryptography;

View File

@ -1,20 +1,20 @@
/*
*
* (c) Copyright Ascensio System Limited 2010-2021
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
*
* (c) Copyright Ascensio System Limited 2010-2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
using System.Linq;
using ASC.ActiveDirectory.Expressions;
using ASC.Security.Cryptography;

View File

@ -1,20 +1,20 @@
/*
*
* (c) Copyright Ascensio System Limited 2010-2021
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
*
* (c) Copyright Ascensio System Limited 2010-2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
using ASC.ActiveDirectory.DirectoryServices;
using System;
using System.DirectoryServices;

View File

@ -1,20 +1,20 @@
/*
*
* (c) Copyright Ascensio System Limited 2010-2021
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
*
* (c) Copyright Ascensio System Limited 2010-2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
using System.Collections.Generic;
using Newtonsoft.Json;

View File

@ -1,20 +1,20 @@
/*
*
* (c) Copyright Ascensio System Limited 2010-2021
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
*
* (c) Copyright Ascensio System Limited 2010-2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
using System;
using System.Collections.Generic;
using System.ComponentModel;

View File

@ -1,20 +1,20 @@
/*
*
* (c) Copyright Ascensio System Limited 2010-2021
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
*
* (c) Copyright Ascensio System Limited 2010-2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
using System;
using System.Collections.Generic;

View File

@ -1,20 +1,20 @@
/*
*
* (c) Copyright Ascensio System Limited 2010-2021
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
*
* (c) Copyright Ascensio System Limited 2010-2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;

View File

@ -1,20 +1,20 @@
/*
*
* (c) Copyright Ascensio System Limited 2010-2021
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
*
* (c) Copyright Ascensio System Limited 2010-2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
using System.Resources;
namespace ASC.ActiveDirectory.ComplexOperations

View File

@ -1,20 +1,20 @@
/*
*
* (c) Copyright Ascensio System Limited 2010-2021
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
*
* (c) Copyright Ascensio System Limited 2010-2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
using System;
using System.Globalization;
using System.Linq;

View File

@ -1,20 +1,20 @@
/*
*
* (c) Copyright Ascensio System Limited 2010-2021
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
*
* (c) Copyright Ascensio System Limited 2010-2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
using System.Runtime.Serialization;
using ASC.ActiveDirectory.Base.Data;
@ -24,30 +24,39 @@ namespace ASC.ActiveDirectory.ComplexOperations
[DataContract]
public class LdapOperationStatus
{
///<example>true</example>
[DataMember]
public bool Completed { get; set; }
///<example>true</example>
[DataMember]
public string Id { get; set; }
///<example>true</example>
[DataMember]
public string Status { get; set; }
///<example>true</example>
[DataMember]
public string Error { get; set; }
///<example>true</example>
[DataMember]
public string Warning { get; set; }
///<example>true</example>
[DataMember]
public int Percents { get; set; }
///<type>ASC.ActiveDirectory.Base.Data.LdapCertificateConfirmRequest, ASC.ActiveDirectory</type>
[DataMember]
public LdapCertificateConfirmRequest CertificateConfirmRequest { get; set; }
///<example>Source</example>
[DataMember]
public string Source { get; set; }
///<example>OperationType</example>
[DataMember]
public string OperationType { get; set; }
}

View File

@ -1,20 +1,20 @@
/*
*
* (c) Copyright Ascensio System Limited 2010-2021
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
*
* (c) Copyright Ascensio System Limited 2010-2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
namespace ASC.ActiveDirectory.ComplexOperations
{
public enum LdapOperationType

View File

@ -1,20 +1,20 @@
/*
*
* (c) Copyright Ascensio System Limited 2010-2021
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
*
* (c) Copyright Ascensio System Limited 2010-2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
using System;
using System.Collections.Generic;
using System.Linq;
@ -101,7 +101,7 @@ namespace ASC.ActiveDirectory.ComplexOperations
((LdapCurrentUserPhotos)LdapCurrentUserPhotos.Load().GetDefault()).Save();
((LdapCurrentAcccessSettings)LdapCurrentAcccessSettings.Load().GetDefault()).Save();
//не снимать права при выключении
//do not remove permissions on shutdown
//var rights = new List<LdapSettings.AccessRight>();
//TakeUsersRights(rights);

View File

@ -1,20 +1,20 @@
/*
*
* (c) Copyright Ascensio System Limited 2010-2021
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
*
* (c) Copyright Ascensio System Limited 2010-2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
using System;
using System.Collections.Generic;
using System.Globalization;
@ -127,6 +127,14 @@ namespace ASC.ActiveDirectory
_log.DebugFormat("CoreContext.UserManager.SaveUserInfo({0})", ldapUserInfo.GetUserInfoString());
portalUserInfo = CoreContext.UserManager.SaveUserInfo(ldapUserInfo, syncCardDav: true);
var quotaSettings = TenantUserQuotaSettings.Load();
if (quotaSettings.EnableUserQuota)
{
var userSettings = new UserQuotaSettings { UserQuota = ldapUserInfo.LdapQouta };
userSettings.SaveForUser(ldapUserInfo.ID);
}
var passwordHash = LdapUtils.GeneratePassword();
@ -249,7 +257,6 @@ namespace ASC.ActiveDirectory
null,
new[] { new DirectRecipient(ldapUserInfo.Email, null, new[] { ldapUserInfo.Email }, false) },
new[] { ASC.Core.Configuration.Constants.NotifyEMailSenderSysName },
null,
new TagValue(NotifyConstants.TagUserName, ldapUserInfo.DisplayUserName()),
new TagValue(NotifyConstants.TagUserEmail, ldapUserInfo.Email),
new TagValue(NotifyConstants.TagMyStaffLink, CommonLinkUtility.GetFullAbsolutePath(CommonLinkUtility.GetMyStaff())),

View File

@ -1,20 +1,20 @@
/*
*
* (c) Copyright Ascensio System Limited 2010-2021
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
*
* (c) Copyright Ascensio System Limited 2010-2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
using System;
using System.Linq;
using System.Text;
@ -156,6 +156,50 @@ namespace ASC.ActiveDirectory
return false;
}
public static long ConvertSizeToBytes(string size)
{
long bytes = 0;
try
{
if (size == null) { return -1; }
var regex = new Regex(@"\d+|\w+");
var matches = regex.Matches(size);
if (matches.Count > 0)
{
var num = int.Parse(matches[0].Value);
var unit = matches[1].Value.ToLower();
switch (unit)
{
case "bytes":
bytes = num;
break;
case "kb":
bytes = num * 1024;
break;
case "mb":
bytes = Convert.ToInt64(num * Math.Pow(1024, 2));
break;
case "gb":
bytes = Convert.ToInt64(num * Math.Pow(1024, 3));
break;
case "tb":
bytes = Convert.ToInt64(num * Math.Pow(1024, 4));
break;
case "pb":
bytes = Convert.ToInt64(num * Math.Pow(1024, 5));
break;
}
return bytes;
}
}
catch (Exception)
{
}
return -1;
}
public static bool TryInstallCert(Syscert.X509Certificate certificate, ILog log = null)
{
try

View File

@ -1,20 +1,20 @@
/*
*
* (c) Copyright Ascensio System Limited 2010-2021
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
*
* (c) Copyright Ascensio System Limited 2010-2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
using System;
using System.Collections.Generic;
using System.Linq;
@ -108,6 +108,7 @@ namespace ASC.ActiveDirectory.Novell.Data
/// Get property object
/// </summary>
/// <param name="propertyName">property name</param>
/// <param name="getBytes"></param>
/// <returns>value object</returns>
public sealed override object GetValue(string propertyName, bool getBytes = false)
{

View File

@ -1,20 +1,20 @@
/*
*
* (c) Copyright Ascensio System Limited 2010-2021
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
*
* (c) Copyright Ascensio System Limited 2010-2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
using System;
using ASC.ActiveDirectory.Base.Data;

View File

@ -1,20 +1,20 @@
/*
*
* (c) Copyright Ascensio System Limited 2010-2021
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
*
* (c) Copyright Ascensio System Limited 2010-2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
using System;
using System.Collections.Generic;
using System.Globalization;

View File

@ -1,20 +1,20 @@
/*
*
* (c) Copyright Ascensio System Limited 2010-2021
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
*
* (c) Copyright Ascensio System Limited 2010-2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
using System;
using System.Collections.Generic;
using System.Configuration;

View File

@ -1,20 +1,20 @@
/*
*
* (c) Copyright Ascensio System Limited 2010-2021
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
*
* (c) Copyright Ascensio System Limited 2010-2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
using System;
using System.Collections.Generic;
using System.Configuration;

View File

@ -1,20 +1,20 @@
/*
*
* (c) Copyright Ascensio System Limited 2010-2021
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
*
* (c) Copyright Ascensio System Limited 2010-2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
using System;
using System.Linq;
using System.Net.Sockets;

View File

@ -1,20 +1,20 @@
/*
*
* (c) Copyright Ascensio System Limited 2010-2021
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
*
* (c) Copyright Ascensio System Limited 2010-2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
using ASC.ActiveDirectory.Base;
using ASC.ActiveDirectory.Base.Settings;
using ASC.ActiveDirectory.ComplexOperations;

View File

@ -27,6 +27,8 @@
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
<PlatformTarget>AnyCPU</PlatformTarget>
<DocumentationFile>..\..\web\studio\ASC.Web.Studio\bin\ASC.Common.xml</DocumentationFile>
<NoWarn>CS1591</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>none</DebugType>
@ -217,6 +219,7 @@
<Compile Include="Utils\ConfigurationManagerExtension.cs" />
<Compile Include="Utils\DnsLookup.cs" />
<Compile Include="Utils\HttpRequestExtensions.cs" />
<Compile Include="Utils\IpAddressParser.cs" />
<Compile Include="Utils\MailAddressUtils.cs" />
<Compile Include="Utils\MimeHeaderUtils.cs" />
<Compile Include="Utils\RandomString.cs" />
@ -229,6 +232,8 @@
<Compile Include="Threading\Workers\WorkerQueue.cs" />
<Compile Include="Threading\Workers\WorkItem.cs" />
<Compile Include="Web\AbstractHttpAsyncHandler.cs" />
<Compile Include="Web\HttpClientFactory.cs" />
<Compile Include="Web\ResiliencePolicyManager.cs" />
<Compile Include="Web\DisposableHttpContext.cs" />
<Compile Include="Web\DisposableHttpContextHttpModule.cs" />
<Compile Include="Web\MimeMapping.cs" />
@ -263,17 +268,23 @@
<Version>3.1.4</Version>
</PackageReference>
<PackageReference Include="MySql.Data">
<Version>8.0.29</Version>
<Version>8.0.32.1</Version>
</PackageReference>
<PackageReference Include="Newtonsoft.Json">
<Version>13.0.1</Version>
</PackageReference>
<PackageReference Include="NLog">
<Version>4.7.11</Version>
<Version>5.1.2</Version>
</PackageReference>
<PackageReference Include="NLog.Targets.Syslog">
<Version>7.0.0</Version>
</PackageReference>
<PackageReference Include="NVelocity">
<Version>1.2.0</Version>
</PackageReference>
<PackageReference Include="Polly">
<Version>7.2.3</Version>
</PackageReference>
<PackageReference Include="StackExchange.Redis">
<Version>2.2.88</Version>
</PackageReference>
@ -296,6 +307,8 @@
<ItemGroup>
<Reference Include="System.Net.Http" />
<Reference Include="System.Runtime.Caching" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.ServiceModel" />
<Reference Include="System.Web" />
<Reference Include="System.Web.Extensions" />
<Reference Include="System.Xml.Linq" />

View File

@ -1,6 +1,6 @@
/*
*
* (c) Copyright Ascensio System Limited 2010-2021
* (c) Copyright Ascensio System Limited 2010-2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -23,8 +23,6 @@ using System.Linq;
using System.Runtime.Caching;
using System.Text.RegularExpressions;
using StackExchange.Redis.Extensions.Core.Extensions;
namespace ASC.Common.Caching
{
public class AscCache : ICache, ICacheNotify
@ -100,38 +98,44 @@ namespace ASC.Common.Caching
public IDictionary<string, T> HashGetAll<T>(string key)
{
var cache = GetCache();
var dic = (IDictionary<string, T>)cache.Get(key);
return dic != null ? new Dictionary<string, T>(dic) : new Dictionary<string, T>();
var dic = (ConcurrentDictionary<string, T>)cache.Get(key);
return dic != null ? new ConcurrentDictionary<string, T>(dic) : new ConcurrentDictionary<string, T>();
}
public T HashGet<T>(string key, string field)
{
var cache = GetCache();
T value;
var dic = (IDictionary<string, T>)cache.Get(key);
var dic = (ConcurrentDictionary<string, T>)cache.Get(key);
if (dic != null && dic.TryGetValue(field, out value))
{
return value;
}
return default(T);
}
public void HashSet<T>(string key, string field, T value)
{
var cache = GetCache();
var dic = (IDictionary<string, T>)cache.Get(key);
var dic = (ConcurrentDictionary<string, T>)cache.Get(key);
if (value != null)
{
if (dic == null)
{
dic = new Dictionary<string, T>();
dic = new ConcurrentDictionary<string, T>();
}
dic[field] = value;
dic.AddOrUpdate(field, value, (k, v) => value);
cache.Set(key, dic, null);
}
else if (dic != null)
{
dic.Remove(field);
dic.TryRemove(field, out _);
if (dic.Count == 0)
{
cache.Remove(key);

View File

@ -1,20 +1,20 @@
/*
*
* (c) Copyright Ascensio System Limited 2010-2021
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
*
* (c) Copyright Ascensio System Limited 2010-2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
using System;

View File

@ -1,20 +1,20 @@
/*
*
* (c) Copyright Ascensio System Limited 2010-2021
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
*
* (c) Copyright Ascensio System Limited 2010-2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
using System;
using System.Collections.Generic;
using System.Text.RegularExpressions;

View File

@ -1,20 +1,20 @@
/*
*
* (c) Copyright Ascensio System Limited 2010-2021
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
*
* (c) Copyright Ascensio System Limited 2010-2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
using System;
namespace ASC.Common.Caching

View File

@ -1,6 +1,6 @@
/*
*
* (c) Copyright Ascensio System Limited 2010-2021
* (c) Copyright Ascensio System Limited 2010-2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@ -1,6 +1,6 @@
/*
*
* (c) Copyright Ascensio System Limited 2010-2021
* (c) Copyright Ascensio System Limited 2010-2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@ -1,6 +1,6 @@
/*
*
* (c) Copyright Ascensio System Limited 2010-2021
* (c) Copyright Ascensio System Limited 2010-2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@ -1,6 +1,6 @@
/*
*
* (c) Copyright Ascensio System Limited 2010-2021
* (c) Copyright Ascensio System Limited 2010-2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@ -1,6 +1,6 @@
/*
*
* (c) Copyright Ascensio System Limited 2010-2021
* (c) Copyright Ascensio System Limited 2010-2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@ -1,6 +1,6 @@
/*
*
* (c) Copyright Ascensio System Limited 2010-2021
* (c) Copyright Ascensio System Limited 2010-2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@ -1,6 +1,6 @@
/*
*
* (c) Copyright Ascensio System Limited 2010-2021
* (c) Copyright Ascensio System Limited 2010-2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@ -1,6 +1,6 @@
/*
*
* (c) Copyright Ascensio System Limited 2010-2021
* (c) Copyright Ascensio System Limited 2010-2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@ -1,6 +1,6 @@
/*
*
* (c) Copyright Ascensio System Limited 2010-2021
* (c) Copyright Ascensio System Limited 2010-2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@ -1,6 +1,6 @@
/*
*
* (c) Copyright Ascensio System Limited 2010-2021
* (c) Copyright Ascensio System Limited 2010-2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -30,30 +30,6 @@ namespace ASC.Common.Data
{
public static class DataExtensions
{
public static List<object[]> ExecuteList(this DbConnection connection, string sql, params object[] parameters)
{
using (var command = connection.CreateCommand())
{
return command.ExecuteList(sql, parameters);
}
}
public static T ExecuteScalar<T>(this DbConnection connection, string sql, params object[] parameters)
{
using (var command = connection.CreateCommand())
{
return command.ExecuteScalar<T>(sql, parameters);
}
}
public static int ExecuteNonQuery(this DbConnection connection, string sql, params object[] parameters)
{
using (var command = connection.CreateCommand())
{
return command.ExecuteNonQuery(sql, parameters);
}
}
public static DbCommand CreateCommand(this DbConnection connection, string sql, params object[] parameters)
{
var command = connection.CreateCommand();
@ -198,28 +174,6 @@ namespace ASC.Common.Data
return (T)Convert.ChangeType(scalar, scalarType);
}
public static async Task<T> ExecuteScalarAsync<T>(this DbCommand command, string sql, params object[] parameters)
{
command.PrepareCommand(sql, parameters);
var scalar = await command.ExecuteScalarAsync();
if (scalar == null || scalar == DBNull.Value)
{
return default(T);
}
var scalarType = typeof(T);
if (scalarType == typeof(object))
{
return (T)scalar;
}
if (scalarType.Name == "Nullable`1")
{
scalarType = scalarType.GetGenericArguments()[0];
}
return (T)Convert.ChangeType(scalar, scalarType);
}
public static int ExecuteNonQuery(this DbCommand command, string sql, params object[] parameters)
{
command.PrepareCommand(sql, parameters);
@ -232,21 +186,21 @@ namespace ASC.Common.Data
return command.ExecuteNonQueryAsync();
}
public static List<object[]> ExecuteList(this DbCommand command, ISqlInstruction sql, ISqlDialect dialect)
public static List<object[]> ExecuteList(this DbManager manager, ISqlInstruction sql, ISqlDialect dialect)
{
ApplySqlInstruction(command, sql, dialect);
var command = manager.ApplySqlInstruction(sql, dialect);
return command.ExecuteList();
}
public static Task<List<object[]>> ExecuteListAsync(this DbCommand command, ISqlInstruction sql, ISqlDialect dialect)
public static Task<List<object[]>> ExecuteListAsync(this DbManager manager, ISqlInstruction sql, ISqlDialect dialect)
{
ApplySqlInstruction(command, sql, dialect);
var command = manager.ApplySqlInstruction(sql, dialect);
return command.ExecuteListAsync();
}
public static List<T> ExecuteList<T>(this DbCommand command, ISqlInstruction sql, ISqlDialect dialect, Converter<IDataRecord, T> mapper)
public static List<T> ExecuteList<T>(this DbManager manager, ISqlInstruction sql, ISqlDialect dialect, Converter<IDataRecord, T> mapper)
{
ApplySqlInstruction(command, sql, dialect);
var command = manager.ApplySqlInstruction(sql, dialect);
var result = new List<T>();
using (var reader = command.ExecuteReader())
{
@ -258,37 +212,47 @@ namespace ASC.Common.Data
return result;
}
public static T ExecuteScalar<T>(this DbCommand command, ISqlInstruction sql, ISqlDialect dialect)
public static T ExecuteScalar<T>(this DbManager manager, ISqlInstruction sql, ISqlDialect dialect)
{
ApplySqlInstruction(command, sql, dialect);
var command = manager.ApplySqlInstruction(sql, dialect);
return command.ExecuteScalar<T>();
}
public static int ExecuteNonQuery(this DbCommand command, ISqlInstruction sql, ISqlDialect dialect)
public static int ExecuteNonQuery(this IDbManager manager, ISqlInstruction sql, ISqlDialect dialect)
{
ApplySqlInstruction(command, sql, dialect);
var command = ApplySqlInstruction(manager, sql, dialect);
return command.ExecuteNonQuery();
}
private static void ApplySqlInstruction(DbCommand command, ISqlInstruction sql, ISqlDialect dialect)
private static DbCommand ApplySqlInstruction(this IDbManager manager, ISqlInstruction sql, ISqlDialect dialect)
{
var sqlStr = sql.ToString(dialect);
var parameters = sql.GetParameters();
command.Parameters.Clear();
var sqlParts = sqlStr.Split('?');
var sqlBuilder = new StringBuilder();
var i = 0;
foreach(var p in parameters)
var commandParameters = new Dictionary<string, object>();
foreach (var p in parameters)
{
var name = $"p{i}";
command.AddParameter(name, p);
sqlBuilder.AppendFormat("{0}@{1}", sqlParts[i], name);
commandParameters.Add(name, p);
i++;
}
sqlBuilder.Append(sqlParts[sqlParts.Length - 1]);
var command = manager.Command;
command.Parameters.Clear();
foreach (var p in commandParameters)
{
command.AddParameter(p.Key, p.Value);
}
command.CommandText = sqlBuilder.ToString();
return command;
}

View File

@ -1,6 +1,6 @@
/*
*
* (c) Copyright Ascensio System Limited 2010-2021
* (c) Copyright Ascensio System Limited 2010-2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -20,17 +20,20 @@ using System.Collections.Generic;
using System.Data;
using System.Data.Common;
using System.Threading.Tasks;
using System.Web;
using ASC.Common.Data.AdoProxy;
using ASC.Common.Data.Sql;
using ASC.Common.Logging;
using ASC.Common.Web;
using LogManager = ASC.Common.Logging.BaseLogManager;
namespace ASC.Common.Data
{
public class DbSleepConnectionsCounter
{
public static volatile int SleepConnectionsCount;
}
public class DbManager : IDbManager
{
private readonly ILog logger = LogManager.GetLogger("ASC.SQL");
@ -42,7 +45,7 @@ namespace ASC.Common.Data
private readonly int? commandTimeout;
private DbCommand Command
public DbCommand Command
{
get
{
@ -50,10 +53,27 @@ namespace ASC.Common.Data
if (command == null)
{
command = OpenConnection().CreateCommand();
if (logger.IsTraceEnabled)
{
CheckSleepConnections("new command");
}
}
if (command.Connection.State == ConnectionState.Closed || command.Connection.State == ConnectionState.Broken)
if (command.Connection.State == ConnectionState.Broken)
{
command.Connection.Close();
command.Connection.Open();
}
if (command.Connection.State == ConnectionState.Closed)
{
command = OpenConnection().CreateCommand();
if (logger.IsTraceEnabled)
{
CheckSleepConnections("closed command");
}
}
if (commandTimeout.HasValue)
@ -65,6 +85,38 @@ namespace ASC.Common.Data
}
}
private int CountSleepConnections()
{
return command.ExecuteScalar<int>("SELECT COUNT(*) FROM information_schema.processlist WHERE command = 'Sleep'");
}
private void CheckSleepConnections(string flag)
{
try
{
var previousCount = DbSleepConnectionsCounter.SleepConnectionsCount;
var currentCount = CountSleepConnections();
int diff = currentCount - previousCount;
if (diff > 0)
{
logger.Error(string.Format(
"{0}. {1} connection(s) have been leaked! Previous count: {2}, Current count: {3}",
flag,
diff,
previousCount,
currentCount
));
}
DbSleepConnectionsCounter.SleepConnectionsCount = currentCount;
}
catch (Exception e)
{
logger.Error(e);
}
}
public string DatabaseId { get; private set; }
public bool InTransaction
@ -83,9 +135,13 @@ namespace ASC.Common.Data
}
private DbManager(string databaseId, int? commandTimeout = null)
{
if (databaseId == null) throw new ArgumentNullException("databaseId");
public DbManager(string databaseId, int? commandTimeout = null)
{
if (databaseId == null)
{
throw new ArgumentNullException("databaseId");
}
DatabaseId = databaseId;
if (logger.IsDebugEnabled)
@ -103,37 +159,27 @@ namespace ASC.Common.Data
public void Dispose()
{
lock (this)
if (disposed)
{
if (disposed) return;
disposed = true;
if (command != null)
return;
}
disposed = true;
if (command != null)
{
if (command.Connection != null)
{
if (command.Connection != null) command.Connection.Dispose();
command.Dispose();
command = null;
command.Connection.Close();
command.Connection.Dispose();
}
command.Dispose();
command = null;
}
}
#endregion
public static IDbManager FromHttpContext(string databaseId, int? commandTimeout = null)
{
if (HttpContext.Current != null)
{
var dbManager = DisposableHttpContext.Current[databaseId] as DbManager;
if (dbManager == null || dbManager.disposed)
{
var localDbManager = new DbManager(databaseId, commandTimeout);
var dbManagerAdapter = new DbManagerProxy(localDbManager);
DisposableHttpContext.Current[databaseId] = localDbManager;
return dbManagerAdapter;
}
return new DbManagerProxy(dbManager);
}
return new DbManager(databaseId, commandTimeout);
}
private DbConnection OpenConnection()
{
@ -155,7 +201,10 @@ namespace ASC.Common.Data
public IDbTransaction BeginTransaction()
{
if (InTransaction) throw new InvalidOperationException("Transaction already open.");
if (InTransaction)
{
throw new InvalidOperationException("Transaction already open.");
}
Command.Transaction = Command.Connection.BeginTransaction();
@ -166,7 +215,10 @@ namespace ASC.Common.Data
public IDbTransaction BeginTransaction(IsolationLevel il)
{
if (InTransaction) throw new InvalidOperationException("Transaction already open.");
if (InTransaction)
{
throw new InvalidOperationException("Transaction already open.");
}
il = GetDialect().GetSupportedIsolationLevel(il);
Command.Transaction = Command.Connection.BeginTransaction(il);
@ -193,17 +245,17 @@ namespace ASC.Common.Data
public List<object[]> ExecuteList(ISqlInstruction sql)
{
return Command.ExecuteList(sql, GetDialect());
return this.ExecuteList(sql, GetDialect());
}
public Task<List<object[]>> ExecuteListAsync(ISqlInstruction sql)
{
return Command.ExecuteListAsync(sql, GetDialect());
return this.ExecuteListAsync(sql, GetDialect());
}
public List<T> ExecuteList<T>(ISqlInstruction sql, Converter<IDataRecord, T> converter)
{
return Command.ExecuteList(sql, GetDialect(), converter);
return this.ExecuteList(sql, GetDialect(), converter);
}
public T ExecuteScalar<T>(string sql, params object[] parameters)
@ -213,7 +265,7 @@ namespace ASC.Common.Data
public T ExecuteScalar<T>(ISqlInstruction sql)
{
return Command.ExecuteScalar<T>(sql, GetDialect());
return this.ExecuteScalar<T>(sql, GetDialect());
}
public int ExecuteNonQuery(string sql, params object[] parameters)
@ -228,12 +280,15 @@ namespace ASC.Common.Data
public int ExecuteNonQuery(ISqlInstruction sql)
{
return Command.ExecuteNonQuery(sql, GetDialect());
return this.ExecuteNonQuery(sql, GetDialect());
}
public int ExecuteBatch(IEnumerable<ISqlInstruction> batch)
{
if (batch == null) throw new ArgumentNullException("batch");
if (batch == null)
{
throw new ArgumentNullException("batch");
}
var affected = 0;
using (var tx = BeginTransaction())
@ -257,7 +312,10 @@ namespace ASC.Common.Data
private void CheckDispose()
{
if (disposed) throw new ObjectDisposedException(GetType().FullName);
if (disposed)
{
throw new ObjectDisposedException(GetType().FullName);
}
}
private ISqlDialect GetDialect()
@ -282,91 +340,4 @@ namespace ASC.Common.Data
string.Empty;
}
}
public class DbManagerProxy : IDbManager
{
private DbManager dbManager { get; set; }
public DbManagerProxy(DbManager dbManager)
{
this.dbManager = dbManager;
}
public void Dispose()
{
if (HttpContext.Current == null)
{
dbManager.Dispose();
}
}
public DbConnection Connection { get { return dbManager.Connection; } }
public string DatabaseId { get { return dbManager.DatabaseId; } }
public bool InTransaction { get { return dbManager.InTransaction; } }
public bool IsDisposed { get { return dbManager.IsDisposed; } }
public IDbTransaction BeginTransaction()
{
return dbManager.BeginTransaction();
}
public IDbTransaction BeginTransaction(IsolationLevel isolationLevel)
{
return dbManager.BeginTransaction(isolationLevel);
}
public IDbTransaction BeginTransaction(bool nestedIfAlreadyOpen)
{
return dbManager.BeginTransaction(nestedIfAlreadyOpen);
}
public List<object[]> ExecuteList(string sql, params object[] parameters)
{
return dbManager.ExecuteList(sql, parameters);
}
public List<object[]> ExecuteList(ISqlInstruction sql)
{
return dbManager.ExecuteList(sql);
}
public Task<List<object[]>> ExecuteListAsync(ISqlInstruction sql)
{
return dbManager.ExecuteListAsync(sql);
}
public List<T> ExecuteList<T>(ISqlInstruction sql, Converter<IDataRecord, T> converter)
{
return dbManager.ExecuteList<T>(sql, converter);
}
public T ExecuteScalar<T>(string sql, params object[] parameters)
{
return dbManager.ExecuteScalar<T>(sql, parameters);
}
public T ExecuteScalar<T>(ISqlInstruction sql)
{
return dbManager.ExecuteScalar<T>(sql);
}
public int ExecuteNonQuery(string sql, params object[] parameters)
{
return dbManager.ExecuteNonQuery(sql, parameters);
}
public int ExecuteNonQuery(ISqlInstruction sql)
{
return dbManager.ExecuteNonQuery(sql);
}
public int ExecuteBatch(IEnumerable<ISqlInstruction> batch)
{
return dbManager.ExecuteBatch(batch);
}
public Task<int> ExecuteNonQueryAsync(string sql, params object[] parameters)
{
return dbManager.ExecuteNonQueryAsync(sql, parameters);
}
}
}

View File

@ -1,6 +1,6 @@
/*
*
* (c) Copyright Ascensio System Limited 2010-2021
* (c) Copyright Ascensio System Limited 2010-2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@ -1,6 +1,6 @@
/*
*
* (c) Copyright Ascensio System Limited 2010-2021
* (c) Copyright Ascensio System Limited 2010-2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@ -1,6 +1,6 @@
/*
*
* (c) Copyright Ascensio System Limited 2010-2021
* (c) Copyright Ascensio System Limited 2010-2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@ -1,6 +1,6 @@
/*
*
* (c) Copyright Ascensio System Limited 2010-2021
* (c) Copyright Ascensio System Limited 2010-2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -27,6 +27,7 @@ namespace ASC.Common.Data
{
public interface IDbManager : IDisposable
{
DbCommand Command { get; }
DbConnection Connection { get; }
string DatabaseId { get; }
bool InTransaction { get; }

View File

@ -1,6 +1,6 @@
/*
*
* (c) Copyright Ascensio System Limited 2010-2021
* (c) Copyright Ascensio System Limited 2010-2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -29,7 +29,7 @@ namespace ASC.Common.Data
{
public class MultiRegionalDbManager : IDbManager
{
private readonly List<IDbManager> databases;
private readonly List<DbManager> databases;
private readonly IDbManager localDb;
@ -45,6 +45,11 @@ namespace ASC.Common.Data
get { return localDb.Connection; }
}
public DbCommand Command
{
get { return localDb.Command; }
}
public MultiRegionalDbManager(string dbId)
{
@ -52,12 +57,12 @@ namespace ASC.Common.Data
DatabaseId = dbId;
databases = ConfigurationManager.ConnectionStrings.OfType<ConnectionStringSettings>()
.Where(c => c.Name.Equals(dbId, cmp) || c.Name.StartsWith(dbId + ".", cmp))
.Select(c => DbManager.FromHttpContext(c.Name))
.Select(c => new DbManager(c.Name))
.ToList();
localDb = databases.SingleOrDefault(db => db.DatabaseId.Equals(dbId, cmp));
}
public MultiRegionalDbManager(IEnumerable<IDbManager> databases)
public MultiRegionalDbManager(IEnumerable<DbManager> databases)
{
this.databases = databases.ToList();
localDb = databases.FirstOrDefault();

View File

@ -1,6 +1,6 @@
/*
*
* (c) Copyright Ascensio System Limited 2010-2021
* (c) Copyright Ascensio System Limited 2010-2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@ -1,6 +1,6 @@
/*
*
* (c) Copyright Ascensio System Limited 2010-2021
* (c) Copyright Ascensio System Limited 2010-2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@ -1,6 +1,6 @@
/*
*
* (c) Copyright Ascensio System Limited 2010-2021
* (c) Copyright Ascensio System Limited 2010-2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

Some files were not shown because too many files have changed in this diff Show More