Merge branch 'develop' into feature/rtl-interface-client
This commit is contained in:
commit
6b8424f5cd
@ -1568,9 +1568,9 @@
|
||||
<ROW Key="xml" Component="tools" FileName="*.xml" Directory="tools_Dir" Options="17"/>
|
||||
</COMPONENT>
|
||||
<COMPONENT cid="caphyon.advinst.msicomp.XmlAttributeComponent">
|
||||
<ROW XmlAttribute="minlevel" XmlElement="logger" Name="minlevel" Flags="14" Order="0" Value="Trace"/>
|
||||
<ROW XmlAttribute="minlevel_1" XmlElement="logger_1" Name="minlevel" Flags="14" Order="0" Value="Trace"/>
|
||||
<ROW XmlAttribute="minlevel_2" XmlElement="logger_2" Name="minlevel" Flags="14" Order="0" Value="Trace"/>
|
||||
<ROW XmlAttribute="minlevel" XmlElement="logger" Name="minlevel" Flags="14" Order="0" Value="Warn"/>
|
||||
<ROW XmlAttribute="minlevel_1" XmlElement="logger_1" Name="minlevel" Flags="14" Order="0" Value="Warn"/>
|
||||
<ROW XmlAttribute="minlevel_2" XmlElement="logger_2" Name="minlevel" Flags="14" Order="0" Value="Warn"/>
|
||||
</COMPONENT>
|
||||
<COMPONENT cid="caphyon.advinst.msicomp.XmlElementComponent">
|
||||
<ROW XmlElement="logger" ParentElement="rules" Name="logger" Condition="ENVIRONMENT = "PRODUCT.ENVIRONMENT.SUB"" Order="0" Flags="22" UpdateIndexInParent="0"/>
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 84 KiB After Width: | Height: | Size: 84 KiB |
Binary file not shown.
Before Width: | Height: | Size: 451 KiB After Width: | Height: | Size: 451 KiB |
Binary file not shown.
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 17 KiB |
@ -42,7 +42,6 @@ del /f /q build\install\win\Files\config\*.test.json
|
||||
del /f /q build\install\win\Files\config\*.dev.json
|
||||
|
||||
::default logging to warning
|
||||
%sed% -i "s/minlevel=\"Debug\""/minlevel=\"Warn\""/g" build\install\win\Files\config\nlog.config
|
||||
%sed% "s_\(\"Default\":\).*,_\1 \"Warning\",_g" -i build\install\win\Files\config\appsettings.json
|
||||
%sed% "s_\(\"logLevel\":\).*_\1 \"warning\"_g" -i build\install\win\Files\config\appsettings.services.json
|
||||
%sed% "/\"debug-info\": {/,/}/ s/\(\"enabled\": \)\".*\"/\1\"false\"/" -i build\install\win\Files\config\appsettings.json
|
||||
|
@ -46,6 +46,7 @@ public abstract class LdapObject
|
||||
/// 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);
|
||||
|
||||
|
@ -147,8 +147,6 @@ public class Expression : ICloneable
|
||||
/// 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" />
|
||||
/// <returns>The escaped search filter.</returns>
|
||||
private static string EscapeLdapSearchFilter(string searchFilter)
|
||||
{
|
||||
|
@ -28,6 +28,8 @@ using System.Runtime.InteropServices;
|
||||
|
||||
namespace ASC.ActiveDirectory.Base.Settings;
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
[Scope]
|
||||
[Serializable]
|
||||
public class LdapSettings : ISettings<LdapSettings>, ICloneable
|
||||
@ -44,6 +46,7 @@ public class LdapSettings : ISettings<LdapSettings>, ICloneable
|
||||
AccessRights = new Dictionary<AccessRight, string>();
|
||||
}
|
||||
|
||||
/// <summary>LDAP settings mapping</summary>
|
||||
public enum MappingFields
|
||||
{
|
||||
FirstNameAttribute,
|
||||
@ -64,6 +67,7 @@ public class LdapSettings : ISettings<LdapSettings>, ICloneable
|
||||
UserQuotaLimit
|
||||
}
|
||||
|
||||
/// <summary>Accecss rights</summary>
|
||||
public enum AccessRight
|
||||
{
|
||||
FullAccess,
|
||||
@ -206,31 +210,55 @@ public class LdapSettings : ISettings<LdapSettings>, ICloneable
|
||||
return MemberwiseClone();
|
||||
}
|
||||
|
||||
/// <summary>Specifies if the LDAP authentication is enabled or not</summary>
|
||||
/// <type>System.Boolean, System</type>
|
||||
public bool EnableLdapAuthentication { get; set; }
|
||||
|
||||
/// <summary>Specifies if the StartTLS is enabled or not</summary>
|
||||
/// <type>System.Boolean, System</type>
|
||||
public bool StartTls { get; set; }
|
||||
|
||||
/// <summary>Specifies if the SSL is enabled or not</summary>
|
||||
/// <type>System.Boolean, System</type>
|
||||
public bool Ssl { get; set; }
|
||||
|
||||
/// <summary>Specifies if the welcome email is sent or not</summary>
|
||||
/// <type>System.Boolean, System</type>
|
||||
public bool SendWelcomeEmail { get; set; }
|
||||
|
||||
/// <summary>LDAP server URL address</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string Server { get; set; }
|
||||
|
||||
/// <summary>Absolute path to the top level directory containing users for the import</summary>
|
||||
/// <type>System.String, System</type>
|
||||
// ReSharper disable once InconsistentNaming
|
||||
public string UserDN { get; set; }
|
||||
|
||||
/// <summary>Port number</summary>
|
||||
/// <type>System.Int32, System</type>
|
||||
[JsonNumberHandling(JsonNumberHandling.AllowReadingFromString)]
|
||||
public int PortNumber { get; set; }
|
||||
|
||||
/// <summary>User filter value to import the users who correspond to the specified search criteria. The default filter value (uid=*) allows importing all users</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string UserFilter { get; set; }
|
||||
|
||||
/// <summary>Attribute in a user record that corresponds to the login that LDAP server users will use to log in to ONLYOFFICE</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string LoginAttribute { get; set; }
|
||||
|
||||
/// <summary>Correspondence between the user data fields on the portal and the attributes in the LDAP server user record</summary>
|
||||
/// <type>System.Collections.Generic.Dictionary{ASC.ActiveDirectory.Base.Settings.MappingFields, System.String}, System.Collections.Generic</type>
|
||||
public Dictionary<MappingFields, string> LdapMapping { get; set; }
|
||||
|
||||
/// <summary>Group access rights</summary>
|
||||
/// <type>System.Collections.Generic.Dictionary{ASC.ActiveDirectory.Base.Settings.AccessRight, System.String}, System.Collections.Generic</type>
|
||||
//ToDo: use SId instead of group name
|
||||
public Dictionary<AccessRight, string> AccessRights { get; set; }
|
||||
|
||||
/// <summary>Attribute in a user record that corresponds to the user's first name</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string FirstNameAttribute
|
||||
{
|
||||
get
|
||||
@ -244,6 +272,8 @@ public class LdapSettings : ISettings<LdapSettings>, ICloneable
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Attribute in a user record that corresponds to the user's second name</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string SecondNameAttribute
|
||||
{
|
||||
get
|
||||
@ -257,6 +287,8 @@ public class LdapSettings : ISettings<LdapSettings>, ICloneable
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Attribute in a user record that corresponds to the user's email address</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string MailAttribute
|
||||
{
|
||||
get
|
||||
@ -270,6 +302,8 @@ public class LdapSettings : ISettings<LdapSettings>, ICloneable
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Attribute in a user record that corresponds to the user's title</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string TitleAttribute
|
||||
{
|
||||
get
|
||||
@ -283,6 +317,8 @@ public class LdapSettings : ISettings<LdapSettings>, ICloneable
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Attribute in a user record that corresponds to the user's mobile phone number</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string MobilePhoneAttribute
|
||||
{
|
||||
get
|
||||
@ -296,6 +332,8 @@ public class LdapSettings : ISettings<LdapSettings>, ICloneable
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Attribute in a user record that corresponds to the user's location</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string LocationAttribute
|
||||
{
|
||||
get
|
||||
@ -309,31 +347,57 @@ public class LdapSettings : ISettings<LdapSettings>, ICloneable
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Specifies if the groups from the LDAP server are added to the portal or not</summary>
|
||||
/// <type>System.Boolean, System</type>
|
||||
public bool GroupMembership { get; set; }
|
||||
|
||||
/// <summary>The absolute path to the top level directory containing groups for the import</summary>
|
||||
/// <type>System.String, System</type>
|
||||
// ReSharper disable once InconsistentNaming
|
||||
public string GroupDN { get; set; }
|
||||
|
||||
/// <summary>Attribute that corresponds to a name of the group where the user is included</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string GroupNameAttribute { get; set; }
|
||||
|
||||
/// <summary>Group filter value to import the groups who correspond to the specified search criteria. The default filter value (objectClass=posixGroup) allows importing all users</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string GroupFilter { get; set; }
|
||||
|
||||
/// <summary>Attribute that determines whether this user is a member of the groups</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string UserAttribute { get; set; }
|
||||
|
||||
/// <summary>Attribute that specifies the users that the group includes</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string GroupAttribute { get; set; }
|
||||
|
||||
/// <summary>Specifies if the user has rights to read data from LDAP server or not</summary>
|
||||
/// <type>System.Boolean, System</type>
|
||||
public bool Authentication { get; set; }
|
||||
|
||||
/// <summary>Login</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string Login { get; set; }
|
||||
|
||||
/// <summary>Password</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string Password { get; set; }
|
||||
|
||||
/// <summary>Password bytes</summary>
|
||||
/// <type>System.Byte[], System</type>
|
||||
public byte[] PasswordBytes { get; set; }
|
||||
|
||||
/// <summary>Specifies if the default LDAP settings are used or not</summary>
|
||||
/// <type>System.Boolean, System</type>
|
||||
public bool IsDefault { get; set; }
|
||||
|
||||
/// <summary>Specifies if the certificate is accepted or not</summary>
|
||||
/// <type>System.Boolean, System</type>
|
||||
public bool AcceptCertificate { get; set; }
|
||||
|
||||
/// <summary>Hash that is used to accept a certificate</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string AcceptCertificateHash { get; set; }
|
||||
|
||||
private string GetOldSetting(MappingFields field)
|
||||
|
@ -39,8 +39,8 @@ public class NovellLdapObject : LdapObject
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="ldapEntry">init ldap entry</param>
|
||||
/// <param name="ldapUniqueIdAttribute"></param>
|
||||
/// <param name="logger">init ldap entry</param>
|
||||
/// <param name="novellLdapEntryExtension"></param>
|
||||
public NovellLdapObject(ILogger logger, NovellLdapEntryExtension novellLdapEntryExtension)
|
||||
{
|
||||
_novellLdapEntryExtension = novellLdapEntryExtension;
|
||||
@ -114,6 +114,7 @@ public class NovellLdapObject : LdapObject
|
||||
/// 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)
|
||||
{
|
||||
|
@ -4,6 +4,8 @@
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ProduceReferenceAssembly>false</ProduceReferenceAssembly>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<GenerateDocumentationFile>True</GenerateDocumentationFile>
|
||||
<NoWarn>1701;1702;1591</NoWarn>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
|
||||
|
@ -63,7 +63,7 @@ public class ApiContext : ICloneable
|
||||
/// Gets count to get item from collection. Request parameter "count"
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Don't forget to call _context.SetDataPaginated() to prevent SmartList from filtering response if you fetch data from DB with TOP & COUNT
|
||||
/// Don't forget to call _context.SetDataPaginated() to prevent SmartList from filtering response if you fetch data from DB with TOP & COUNT
|
||||
/// </remarks>
|
||||
public long Count { get; set; }
|
||||
|
||||
@ -71,7 +71,7 @@ public class ApiContext : ICloneable
|
||||
/// Gets start index to get item from collection. Request parameter "startIndex"
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Don't forget to call _context.SetDataPaginated() to prevent SmartList from filtering response if you fetch data from DB with TOP & COUNT
|
||||
/// Don't forget to call _context.SetDataPaginated() to prevent SmartList from filtering response if you fetch data from DB with TOP & COUNT
|
||||
/// </remarks>
|
||||
public long StartIndex { get; set; }
|
||||
|
||||
@ -98,7 +98,7 @@ public class ApiContext : ICloneable
|
||||
|
||||
/// <summary>
|
||||
/// Sort direction. From request parameter "sortOrder" can be "descending" or "ascending"
|
||||
/// Like ...&sortOrder=descending&...
|
||||
/// Like ...&sortOrder=descending&...
|
||||
/// </summary>
|
||||
public bool SortDescending { get; set; }
|
||||
|
||||
|
@ -319,8 +319,6 @@ public abstract class BaseStartup
|
||||
|
||||
app.UseEndpoints(endpoints =>
|
||||
{
|
||||
endpoints.MapCustomAsync(WebhooksEnabled, app.ApplicationServices).Wait();
|
||||
|
||||
endpoints.MapHealthChecks("/health", new HealthCheckOptions()
|
||||
{
|
||||
Predicate = _ => true,
|
||||
@ -336,6 +334,8 @@ public abstract class BaseStartup
|
||||
{
|
||||
Predicate = r => r.Name.Contains("self")
|
||||
});
|
||||
|
||||
endpoints.MapCustomAsync(WebhooksEnabled, app.ApplicationServices).Wait();
|
||||
});
|
||||
|
||||
app.Map("/switch", appBuilder =>
|
||||
|
@ -26,16 +26,44 @@
|
||||
|
||||
namespace ASC.Api.Core;
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
public class Module
|
||||
{
|
||||
/// <summary>ID</summary>
|
||||
/// <type>System.Guid, System</type>
|
||||
public Guid Id { get; set; }
|
||||
|
||||
/// <summary>Product class name</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string AppName { get; set; }
|
||||
|
||||
/// <summary>Title</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string Title { get; set; }
|
||||
|
||||
/// <summary>Start link</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string Link { get; set; }
|
||||
|
||||
/// <summary>Icon URL</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string IconUrl { get; set; }
|
||||
|
||||
/// <summary>Large image URL</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string ImageUrl { get; set; }
|
||||
|
||||
/// <summary>Help URL</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string HelpUrl { get; set; }
|
||||
|
||||
/// <summary>Description</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string Description { get; set; }
|
||||
|
||||
/// <summary>Specifies if the module is primary or not</summary>
|
||||
/// <type>System.Boolean, System</type>
|
||||
public bool IsPrimary { get; set; }
|
||||
|
||||
public Module(Product product)
|
||||
|
@ -26,9 +26,18 @@
|
||||
|
||||
namespace ASC.Web.Api.Models;
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
public class Contact
|
||||
{
|
||||
/// <summary>Contact type</summary>
|
||||
/// <type>System.String, System</type>
|
||||
/// <example>GTalk</example>
|
||||
public string Type { get; set; }
|
||||
|
||||
/// <summary>Contact value</summary>
|
||||
/// <type>System.String, System</type>
|
||||
/// <example>my@gmail.com</example>
|
||||
public string Value { get; set; }
|
||||
|
||||
//For binder
|
||||
|
@ -28,13 +28,32 @@ using System.Collections.Concurrent;
|
||||
|
||||
namespace ASC.Web.Api.Models;
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
public class EmployeeDto
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string DisplayName { get; set; }
|
||||
public string Title { get; set; }
|
||||
public string AvatarSmall { get; set; }
|
||||
/// <summary>ID</summary>
|
||||
/// <type>System.Guid, System</type>
|
||||
public Guid Id { get; set; }
|
||||
|
||||
/// <summary>Display name</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string DisplayName { get; set; }
|
||||
|
||||
/// <summary>Title</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string Title { get; set; }
|
||||
|
||||
/// <summary>Small avatar</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string AvatarSmall { get; set; }
|
||||
|
||||
/// <summary>Profile URL</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string ProfileUrl { get; set; }
|
||||
|
||||
/// <summary>Specifies if the user has an avatar or not</summary>
|
||||
/// <type>System.Boolean, System</type>
|
||||
public bool HasAvatar { get; set; }
|
||||
|
||||
public static EmployeeDto GetSample()
|
||||
|
@ -26,39 +26,136 @@
|
||||
|
||||
namespace ASC.Web.Api.Models;
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
public class EmployeeFullDto : EmployeeDto
|
||||
{
|
||||
/// <summary>First name</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string FirstName { get; set; }
|
||||
|
||||
/// <summary>Last name</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string LastName { get; set; }
|
||||
|
||||
/// <summary>Username</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string UserName { get; set; }
|
||||
|
||||
/// <summary>Email</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string Email { get; set; }
|
||||
|
||||
/// <summary>List of contacts</summary>
|
||||
/// <type>System.Collections.Generic.List{ASC.Web.Api.Models.Contact}, System.Collections.Generic</type>
|
||||
public List<Contact> Contacts { get; set; }
|
||||
|
||||
/// <summary>Birthday</summary>
|
||||
/// <type>ASC.Api.Core.ApiDateTime, ASC.Api.Core</type>
|
||||
public ApiDateTime Birthday { get; set; }
|
||||
|
||||
/// <summary>Sex (male or female)</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string Sex { get; set; }
|
||||
|
||||
/// <summary>Employee status</summary>
|
||||
/// <type>ASC.Core.Users.EmployeeStatus, ASC.Core.Common</type>
|
||||
public EmployeeStatus Status { get; set; }
|
||||
|
||||
/// <summary>Employee activation status</summary>
|
||||
/// <type>ASC.Core.Users.EmployeeActivationStatus, ASC.Core.Common</type>
|
||||
public EmployeeActivationStatus ActivationStatus { get; set; }
|
||||
|
||||
/// <summary>The date when the user account was terminated</summary>
|
||||
/// <type>ASC.Api.Core.ApiDateTime, ASC.Api.Core</type>
|
||||
public ApiDateTime Terminated { get; set; }
|
||||
|
||||
/// <summary>Department</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string Department { get; set; }
|
||||
|
||||
/// <summary>Registration date</summary>
|
||||
/// <type>ASC.Api.Core.ApiDateTime, ASC.Api.Core</type>
|
||||
public ApiDateTime WorkFrom { get; set; }
|
||||
|
||||
/// <summary>List of groups</summary>
|
||||
/// <type>System.Collections.Generic.List{ASC.Web.Api.Models.GroupSummaryDto}, System.Collections.Generic</type>
|
||||
public List<GroupSummaryDto> Groups { get; set; }
|
||||
|
||||
/// <summary>Location</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string Location { get; set; }
|
||||
|
||||
/// <summary>Notes</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string Notes { get; set; }
|
||||
|
||||
/// <summary>Maximum size avatar</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string AvatarMax { get; set; }
|
||||
|
||||
/// <summary>Medium size avatar</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string AvatarMedium { get; set; }
|
||||
|
||||
/// <summary>Avatar</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string Avatar { get; set; }
|
||||
|
||||
/// <summary>Specifies if the user is an administrator or not</summary>
|
||||
/// <type>System.Boolean, System</type>
|
||||
public bool IsAdmin { get; set; }
|
||||
|
||||
/// <summary>Is room admin or not</summary>
|
||||
/// <type>System.Boolean, System</type>
|
||||
public bool IsRoomAdmin { get; set; }
|
||||
|
||||
/// <summary>Specifies if the LDAP settings are enabled for the user or not</summary>
|
||||
/// <type>System.Boolean, System</type>
|
||||
public bool IsLDAP { get; set; }
|
||||
|
||||
/// <summary>List of administrator modules</summary>
|
||||
/// <type>System.Collections.Generic.List{System.String}, System.Collections.Generic</type>
|
||||
public List<string> ListAdminModules { get; set; }
|
||||
|
||||
/// <summary>Specifies if the user is a portal owner or not</summary>
|
||||
/// <type>System.Boolean, System</type>
|
||||
public bool IsOwner { get; set; }
|
||||
|
||||
/// <summary>Specifies if the user is a portal visitor or not</summary>
|
||||
/// <type>System.Boolean, System</type>
|
||||
public bool IsVisitor { get; set; }
|
||||
|
||||
/// <summary>Specifies if the user is a portal collaborator or not</summary>
|
||||
/// <type>System.Boolean, System</type>
|
||||
public bool IsCollaborator { get; set; }
|
||||
|
||||
/// <summary>Language</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string CultureName { get; set; }
|
||||
|
||||
/// <summary>Mobile phone number</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string MobilePhone { get; set; }
|
||||
|
||||
/// <summary>Mobile phone activation status</summary>
|
||||
/// <type>ASC.Core.Users.MobilePhoneActivationStatus, ASC.Core.Common</type>
|
||||
public MobilePhoneActivationStatus MobilePhoneActivationStatus { get; set; }
|
||||
|
||||
/// <summary>Specifies if the SSO settings are enabled for the user or not</summary>
|
||||
/// <type>System.Boolean, System</type>
|
||||
public bool IsSSO { get; set; }
|
||||
|
||||
/// <summary>Theme</summary>
|
||||
/// <type>System.Nullable{ASC.Web.Core.Users.DarkThemeSettingsEnum}, System</type>
|
||||
public DarkThemeSettingsEnum? Theme { get; set; }
|
||||
|
||||
/// <summary>Quota limit</summary>
|
||||
/// <type>System.Int64, System</type>
|
||||
public long QuotaLimit { get; set; }
|
||||
|
||||
/// <summary>Portal used space</summary>
|
||||
/// <type>System.Double, System</type>
|
||||
public double UsedSpace { get; set; }
|
||||
|
||||
public static new EmployeeFullDto GetSample()
|
||||
|
@ -28,10 +28,20 @@ using GroupInfo = ASC.Core.Users.GroupInfo;
|
||||
|
||||
namespace ASC.Web.Api.Models;
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
public class GroupSummaryDto
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
/// <summary>ID</summary>
|
||||
/// <type>System.Guid, System</type>
|
||||
public Guid Id { get; set; }
|
||||
|
||||
/// <summary>Name</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>Manager</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string Manager { get; set; }
|
||||
|
||||
protected GroupSummaryDto() { }
|
||||
|
@ -25,9 +25,16 @@
|
||||
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
|
||||
namespace ASC.Api.Core.Model;
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
public class TaskProgressDto
|
||||
{
|
||||
/// <summary>Specifies if the operation is completed or not</summary>
|
||||
/// <type>System.Boolean, System</type>
|
||||
public bool IsCompleted { get; set; }
|
||||
|
||||
/// <summary>Progress percentage</summary>
|
||||
/// <type>System.Int32, System</type>
|
||||
public int Progress { get; set; }
|
||||
|
||||
public static TaskProgressDto GetSample()
|
||||
|
@ -26,6 +26,8 @@
|
||||
|
||||
namespace ASC.Common.Threading;
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
[ProtoContract(IgnoreUnknownSubTypes = true)]
|
||||
[ProtoInclude(100, typeof(DistributedTaskProgress))]
|
||||
public class DistributedTask
|
||||
@ -38,18 +40,28 @@ public class DistributedTask
|
||||
|
||||
public Action<DistributedTask> Publication { get; set; }
|
||||
|
||||
/// <summary>Instance ID</summary>
|
||||
/// <type>System.Int32, System</type>
|
||||
[ProtoMember(1)]
|
||||
public int InstanceId { get; set; }
|
||||
|
||||
/// <summary>ID</summary>
|
||||
/// <type>System.String, System</type>
|
||||
[ProtoMember(2)]
|
||||
public string Id { get; set; }
|
||||
|
||||
/// <summary>Status</summary>
|
||||
/// <type>ASC.Common.Threading.DistributedTaskStatus, ASC.Common</type>
|
||||
[ProtoMember(3)]
|
||||
public DistributedTaskStatus Status { get; set; }
|
||||
|
||||
/// <summary>Last modified date</summary>
|
||||
/// <type>System.DateTime, System</type>
|
||||
[ProtoMember(4)]
|
||||
public DateTime LastModifiedOn { get; set; }
|
||||
|
||||
/// <summary>Exception</summary>
|
||||
/// <type>System.Object, System</type>
|
||||
public Exception Exception
|
||||
{
|
||||
get => new Exception(_exeption);
|
||||
|
@ -26,6 +26,8 @@
|
||||
|
||||
namespace ASC.Common.Threading;
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
[Transient]
|
||||
[ProtoContract(IgnoreUnknownSubTypes = true)]
|
||||
public class DistributedTaskProgress : DistributedTask
|
||||
@ -33,15 +35,21 @@ public class DistributedTaskProgress : DistributedTask
|
||||
[ProtoMember(1)]
|
||||
private double _percentage;
|
||||
|
||||
/// <summary>Progress percentage</summary>
|
||||
/// <type>System.Double, System</type>
|
||||
public double Percentage
|
||||
{
|
||||
get => Math.Min(100.0, Math.Max(0, _percentage));
|
||||
set => _percentage = value;
|
||||
}
|
||||
|
||||
/// <summary>Specifies if the process is completed or not</summary>
|
||||
/// <type>System.Boolean, System</type>
|
||||
[ProtoMember(2)]
|
||||
public bool IsCompleted { get; set; }
|
||||
|
||||
/// <summary>Number of steps</summary>
|
||||
/// <type>System.Int32, System</type>
|
||||
[ProtoMember(3)]
|
||||
protected int StepCount { get; set; }
|
||||
|
||||
|
@ -14,6 +14,8 @@
|
||||
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
|
||||
<ProduceReferenceAssembly>false</ProduceReferenceAssembly>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<GenerateDocumentationFile>True</GenerateDocumentationFile>
|
||||
<NoWarn>1701;1702;1591</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugType>full</DebugType>
|
||||
|
@ -26,16 +26,38 @@
|
||||
|
||||
namespace ASC.Core.Billing;
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
[DebuggerDisplay("{State} before {DueDate}")]
|
||||
[Serializable]
|
||||
public class Tariff
|
||||
{
|
||||
/// <summary>ID</summary>
|
||||
/// <type>System.Int32, System</type>
|
||||
public int Id { get; set; }
|
||||
|
||||
/// <summary>Tariff state</summary>
|
||||
/// <type>ASC.Core.Billing.TariffState, ASC.Core.Common</type>
|
||||
public TariffState State { get; set; }
|
||||
|
||||
/// <summary>Due date</summary>
|
||||
/// <type>System.DateTime, System</type>
|
||||
public DateTime DueDate { get; set; }
|
||||
|
||||
/// <summary>Delay due date</summary>
|
||||
/// <type>System.DateTime, System</type>
|
||||
public DateTime DelayDueDate { get; set; }
|
||||
|
||||
/// <summary>License date</summary>
|
||||
/// <type>System.DateTime, System</type>
|
||||
public DateTime LicenseDate { get; set; }
|
||||
|
||||
/// <summary>Customer ID</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string CustomerId { get; set; }
|
||||
|
||||
/// <summary>List of quotas</summary>
|
||||
/// <type>System.Collections.Generic.List{ASC.Core.Billing.Quota}, System.Collections.Generic</type>
|
||||
public List<Quota> Quotas { get; set; }
|
||||
|
||||
public override int GetHashCode()
|
||||
@ -58,9 +80,16 @@ public class Tariff
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
public class Quota : IEquatable<Quota>
|
||||
{
|
||||
/// <summary>ID</summary>
|
||||
/// <type>System.Int32, System</type>
|
||||
public int Id { get; set; }
|
||||
|
||||
/// <summary>Quantity</summary>
|
||||
/// <type>System.Int32, System</type>
|
||||
public int Quantity { get; set; }
|
||||
|
||||
public Quota(int id, int quantity)
|
||||
|
@ -80,9 +80,13 @@ public class CoreBaseSettings
|
||||
public bool DisableDocSpace => _disableDocSpace ?? (bool)(_disableDocSpace = string.Equals(Configuration["core:disableDocspace"], "true", StringComparison.OrdinalIgnoreCase));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
[Scope]
|
||||
public class CoreSettings : IDisposable
|
||||
{
|
||||
/// <summary>Base domain</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string BaseDomain
|
||||
{
|
||||
get
|
||||
|
@ -26,6 +26,8 @@
|
||||
|
||||
namespace ASC.Core.Users;
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
[Flags]
|
||||
public enum EmployeeActivationStatus
|
||||
{
|
||||
|
@ -26,6 +26,8 @@
|
||||
|
||||
namespace ASC.Core.Users;
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
[Flags]
|
||||
public enum EmployeeStatus
|
||||
{
|
||||
|
@ -29,6 +29,8 @@ using JsonConverterAttribute = System.Text.Json.Serialization.JsonConverterAttri
|
||||
|
||||
namespace ASC.Core.Users;
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
[Flags]
|
||||
[JsonConverter(typeof(JsonStringEnumConverter))]
|
||||
[EnumExtensions]
|
||||
|
@ -26,6 +26,8 @@
|
||||
|
||||
namespace ASC.Core.Users;
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public sealed class UserInfo : IDirectRecipient, ICloneable, IMapFrom<User>
|
||||
{
|
||||
@ -36,20 +38,58 @@ public sealed class UserInfo : IDirectRecipient, ICloneable, IMapFrom<User>
|
||||
LastModified = DateTime.UtcNow;
|
||||
}
|
||||
|
||||
/// <summary>ID</summary>
|
||||
/// <type>System.Guid, System</type>
|
||||
public Guid Id { get; set; }
|
||||
|
||||
/// <summary>First name</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string FirstName { get; set; }
|
||||
|
||||
/// <summary>Last name</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string LastName { get; set; }
|
||||
|
||||
/// <summary>Username</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string UserName { get; set; }
|
||||
|
||||
/// <summary>Birthday</summary>
|
||||
/// <type>System.Nullable{System.DateTime}, System</type>
|
||||
public DateTime? BirthDate { get; set; }
|
||||
|
||||
/// <summary>Sex (male or female)</summary>
|
||||
/// <type>System.Nullable{System.Boolean}, System</type>
|
||||
public bool? Sex { get; set; }
|
||||
|
||||
/// <summary>Status</summary>
|
||||
/// <type>ASC.Core.Users.EmployeeStatus, ASC.Core.Common</type>
|
||||
public EmployeeStatus Status { get; set; }
|
||||
|
||||
/// <summary>Activation status</summary>
|
||||
/// <type>ASC.Core.Users.EmployeeActivationStatus, ASC.Core.Common</type>
|
||||
public EmployeeActivationStatus ActivationStatus { get; set; }
|
||||
|
||||
/// <summary>The date and time when the user account was terminated</summary>
|
||||
/// <type>System.Nullable{System.DateTime}, System</type>
|
||||
public DateTime? TerminatedDate { get; set; }
|
||||
|
||||
/// <summary>Title</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string Title { get; set; }
|
||||
|
||||
/// <summary>Registration date</summary>
|
||||
/// <type>System.Nullable{System.DateTime}, System</type>
|
||||
public DateTime? WorkFromDate { get; set; }
|
||||
|
||||
/// <summary>Email</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string Email { get; set; }
|
||||
|
||||
private string _contacts;
|
||||
|
||||
/// <summary>List of contacts in the string format</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string Contacts
|
||||
{
|
||||
get => _contacts;
|
||||
@ -60,20 +100,64 @@ public sealed class UserInfo : IDirectRecipient, ICloneable, IMapFrom<User>
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>List of contacts</summary>
|
||||
/// <type>System.Collections.Generic.List{System.String}, System.Collections.Generic</type>
|
||||
public List<string> ContactsList { get; set; }
|
||||
|
||||
/// <summary>Location</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string Location { get; set; }
|
||||
|
||||
/// <summary>Notes</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string Notes { get; set; }
|
||||
|
||||
/// <summary>Specifies if the user account was removed or not</summary>
|
||||
/// <type>System.Boolean, System</type>
|
||||
public bool Removed { get; set; }
|
||||
|
||||
/// <summary>Last modified date</summary>
|
||||
/// <type>System.DateTime, System</type>
|
||||
public DateTime LastModified { get; set; }
|
||||
|
||||
/// <summary>Tenant ID</summary>
|
||||
/// <type>System.Int32, System</type>
|
||||
public int TenantId { get; set; }
|
||||
|
||||
/// <summary>Spceifies if the user is active or not</summary>
|
||||
/// <type>System.Boolean, System</type>
|
||||
public bool IsActive => ActivationStatus.HasFlag(EmployeeActivationStatus.Activated);
|
||||
|
||||
/// <summary>Language</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string CultureName { get; set; }
|
||||
|
||||
/// <summary>Mobile phone</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string MobilePhone { get; set; }
|
||||
|
||||
/// <summary>Mobile phone activation status</summary>
|
||||
/// <type>ASC.Core.Users.MobilePhoneActivationStatus, ASC.Core.Common</type>
|
||||
public MobilePhoneActivationStatus MobilePhoneActivationStatus { get; set; }
|
||||
|
||||
/// <summary>LDAP user identificator</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string Sid { get; set; } // LDAP user identificator
|
||||
|
||||
/// <summary>LDAP user quota attribute</summary>
|
||||
/// <type>System.Int64, System</type>
|
||||
public long LdapQouta { get; set; } // LDAP user quota attribute
|
||||
|
||||
/// <summary>SSO SAML user identificator</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string SsoNameId { get; set; } // SSO SAML user identificator
|
||||
|
||||
/// <summary>SSO SAML user session identificator</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string SsoSessionId { get; set; } // SSO SAML user session identificator
|
||||
|
||||
/// <summary>Creation date</summary>
|
||||
/// <type>System.DateTime, System</type>
|
||||
public DateTime CreateDate { get; set; }
|
||||
|
||||
public override string ToString()
|
||||
|
@ -26,13 +26,32 @@
|
||||
|
||||
namespace ASC.Core.Common.EF;
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
public class FireBaseUser : BaseEntity
|
||||
{
|
||||
/// <summary>ID</summary>
|
||||
/// <type>System.Int32, System</type>
|
||||
public int Id { get; set; }
|
||||
|
||||
/// <summary>User ID</summary>
|
||||
/// <type>System.Guid, System</type>
|
||||
public Guid UserId { get; set; }
|
||||
|
||||
/// <summary>Tenant ID</summary>
|
||||
/// <type>System.Int32, System</type>
|
||||
public int TenantId { get; set; }
|
||||
|
||||
/// <summary>Firebase device token</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string FirebaseDeviceToken { get; set; }
|
||||
|
||||
/// <summary>Application</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string Application { get; set; }
|
||||
|
||||
/// <summary>Specifies if the user is subscribed to the push notifications or not</summary>
|
||||
/// <type>System.Nullable{System.Boolean}, System</type>
|
||||
public bool? IsSubscribed { get; set; }
|
||||
|
||||
public DbTenant Tenant { get; set; }
|
||||
|
@ -26,6 +26,8 @@
|
||||
|
||||
namespace ASC.Core.Encryption;
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
[ProtoContract]
|
||||
public class EncryptionSettings
|
||||
{
|
||||
@ -39,15 +41,21 @@ public class EncryptionSettings
|
||||
NotifyUsers = true;
|
||||
}
|
||||
|
||||
/// <summary>Password</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string Password
|
||||
{
|
||||
get => Pass;
|
||||
set => Pass = (value ?? string.Empty).Replace('#', '_');
|
||||
}
|
||||
|
||||
/// <summary>Status</summary>
|
||||
/// <type>ASC.Core.Encryption.EncryprtionStatus, ASC.Core.Common</type>
|
||||
[ProtoMember(2)]
|
||||
public EncryprtionStatus Status { get; set; }
|
||||
|
||||
/// <summary>Specifies if the users will be notified or not</summary>
|
||||
/// <type>System.Boolean, System</type>
|
||||
[ProtoMember(3)]
|
||||
public bool NotifyUsers { get; set; }
|
||||
|
||||
|
@ -26,6 +26,8 @@
|
||||
|
||||
namespace ASC.MessagingSystem.Core;
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
[EnumExtensions]
|
||||
public enum MessageAction
|
||||
{
|
||||
|
@ -26,11 +26,24 @@
|
||||
|
||||
namespace ASC.Common.Radicale;
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
public class DavResponse
|
||||
{
|
||||
public bool Completed { get; set; }
|
||||
public int StatusCode { get; set; }
|
||||
public string Data { get; set; }
|
||||
/// <summary>Specifies if the operation is completed or not</summary>
|
||||
/// <type>System.Boolean, System</type>
|
||||
public bool Completed { get; set; }
|
||||
|
||||
/// <summary>Status code</summary>
|
||||
/// <type>System.Int32, System</type>
|
||||
public int StatusCode { get; set; }
|
||||
|
||||
/// <summary>Link to the CardDav address book</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string Data { get; set; }
|
||||
|
||||
/// <summary>Error</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string Error { get; set; }
|
||||
|
||||
public override string ToString()
|
||||
|
@ -167,12 +167,28 @@ public class EmailValidationKeyProvider
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
public class EmailValidationKeyModel
|
||||
{
|
||||
/// <summary>Key</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string Key { get; set; }
|
||||
|
||||
/// <summary>Employee type</summary>
|
||||
/// <type>System.Nullabel{ASC.Core.Users.EmployeeType}, System</type>
|
||||
public EmployeeType? EmplType { get; set; }
|
||||
|
||||
/// <summary>Email</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string Email { get; set; }
|
||||
|
||||
/// <summary>User ID</summary>
|
||||
/// <type>System.Nullabel{System.Guid}, System</type>
|
||||
public Guid? UiD { get; set; }
|
||||
|
||||
/// <summary>Confirmation email type</summary>
|
||||
/// <type>System.Nullabel{ASC.Web.Studio.Utility.ConfirmType}, System</type>
|
||||
public ConfirmType? Type { get; set; }
|
||||
|
||||
public void Deconstruct(out string key, out EmployeeType? emplType, out string email, out Guid? uiD, out ConfirmType? type)
|
||||
|
@ -26,12 +26,19 @@
|
||||
|
||||
namespace ASC.Core.Tenants;
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class TenantAuditSettings : ISettings<TenantAuditSettings>
|
||||
{
|
||||
public const int MaxLifeTime = 180;
|
||||
|
||||
/// <summary>Login history lifetime</summary>
|
||||
/// <type>System.Int32, System</type>
|
||||
public int LoginHistoryLifeTime { get; set; }
|
||||
|
||||
/// <summary>Audit trail lifetime</summary>
|
||||
/// <type>System.Int32, System</type>
|
||||
public int AuditTrailLifeTime { get; set; }
|
||||
|
||||
public static readonly Guid Guid = new Guid("{8337D0FB-AD67-4552-8297-802312E7F503}");
|
||||
@ -49,7 +56,11 @@ public class TenantAuditSettings : ISettings<TenantAuditSettings>
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
public class TenantAuditSettingsWrapper
|
||||
{
|
||||
/// <summary>Audit trail settingse</summary>
|
||||
/// <type>ASC.Core.Tenants.TenantAuditSettings, ASC.Core.Common</type>
|
||||
public TenantAuditSettings Settings { get; set; }
|
||||
}
|
||||
|
@ -26,6 +26,8 @@
|
||||
|
||||
namespace ASC.Core.Tenants;
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
[DebuggerDisplay("{Tenant} {Name}")]
|
||||
public class TenantQuota : IMapFrom<DbQuota>
|
||||
{
|
||||
@ -39,11 +41,28 @@ public class TenantQuota : IMapFrom<DbQuota>
|
||||
CountRoom = int.MaxValue
|
||||
};
|
||||
|
||||
/// <summary>Tenant ID</summary>
|
||||
/// <type>System.Int32, System</type>
|
||||
public int TenantId { get; set; }
|
||||
|
||||
/// <summary>Name</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>Price</summary>
|
||||
/// <type>System.Decimal, System</type>
|
||||
public decimal Price { get; set; }
|
||||
|
||||
/// <summary>Price currency symbol</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string PriceCurrencySymbol { get; set; }
|
||||
|
||||
/// <summary>Product ID</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string ProductId { get; set; }
|
||||
|
||||
/// <summary>Specifies if the tenant quota is visible or not</summary>
|
||||
/// <type>System.Boolean, System</type>
|
||||
public bool Visible { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
@ -51,6 +70,8 @@ public class TenantQuota : IMapFrom<DbQuota>
|
||||
|
||||
private List<string> _featuresList;
|
||||
|
||||
/// <summary>Tenant quota features</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string Features
|
||||
{
|
||||
get
|
||||
@ -71,6 +92,9 @@ public class TenantQuota : IMapFrom<DbQuota>
|
||||
}
|
||||
|
||||
private readonly MaxFileSizeFeature _maxFileSizeFeature;
|
||||
|
||||
/// <summary>Maximum file size</summary>
|
||||
/// <type>System.Int64, System</type>
|
||||
public long MaxFileSize
|
||||
{
|
||||
get => _maxFileSizeFeature.Value;
|
||||
@ -78,6 +102,9 @@ public class TenantQuota : IMapFrom<DbQuota>
|
||||
}
|
||||
|
||||
private readonly MaxTotalSizeFeature _maxTotalSizeFeature;
|
||||
|
||||
/// <summary>Maximum total size</summary>
|
||||
/// <type>System.Int64, System</type>
|
||||
public long MaxTotalSize
|
||||
{
|
||||
get => _maxTotalSizeFeature.Value;
|
||||
@ -85,6 +112,9 @@ public class TenantQuota : IMapFrom<DbQuota>
|
||||
}
|
||||
|
||||
private readonly CountUserFeature _countUserFeature;
|
||||
|
||||
/// <summary>Number of portal users</summary>
|
||||
/// <type>System.Int32, System</type>
|
||||
public int CountUser
|
||||
{
|
||||
get => _countUserFeature.Value;
|
||||
@ -92,6 +122,9 @@ public class TenantQuota : IMapFrom<DbQuota>
|
||||
}
|
||||
|
||||
private readonly CountPaidUserFeature _countPaidUserFeature;
|
||||
|
||||
/// <summary>Number of portal room administrators</summary>
|
||||
/// <type>System.Int32, System</type>
|
||||
public int CountRoomAdmin
|
||||
{
|
||||
get => _countPaidUserFeature.Value;
|
||||
@ -99,6 +132,9 @@ public class TenantQuota : IMapFrom<DbQuota>
|
||||
}
|
||||
|
||||
private readonly UsersInRoomFeature _usersInRoomFeature;
|
||||
|
||||
/// <summary>Number of room users</summary>
|
||||
/// <type>System.Int32, System</type>
|
||||
public int UsersInRoom
|
||||
{
|
||||
get => _usersInRoomFeature.Value;
|
||||
@ -106,6 +142,9 @@ public class TenantQuota : IMapFrom<DbQuota>
|
||||
}
|
||||
|
||||
private readonly CountRoomFeature _countRoomFeature;
|
||||
|
||||
/// <summary>Number of rooms</summary>
|
||||
/// <type>System.Int32, System</type>
|
||||
public int CountRoom
|
||||
{
|
||||
get => _countRoomFeature.Value;
|
||||
@ -113,6 +152,9 @@ public class TenantQuota : IMapFrom<DbQuota>
|
||||
}
|
||||
|
||||
private readonly TenantQuotaFeatureFlag _nonProfitFeature;
|
||||
|
||||
/// <summary>Specifies if the tenant quota is nonprofit or not</summary>
|
||||
/// <type>System.Boolean, System</type>
|
||||
public bool NonProfit
|
||||
{
|
||||
get => _nonProfitFeature.Value;
|
||||
@ -120,6 +162,9 @@ public class TenantQuota : IMapFrom<DbQuota>
|
||||
}
|
||||
|
||||
private readonly TenantQuotaFeatureFlag _trialFeature;
|
||||
|
||||
/// <summary>Specifies if the tenant quota is trial or not</summary>
|
||||
/// <type>System.Boolean, System</type>
|
||||
public bool Trial
|
||||
{
|
||||
get => _trialFeature.Value;
|
||||
@ -127,6 +172,9 @@ public class TenantQuota : IMapFrom<DbQuota>
|
||||
}
|
||||
|
||||
private readonly TenantQuotaFeatureFlag _freeFeature;
|
||||
|
||||
/// <summary>Specifies if the tenant quota is free or not</summary>
|
||||
/// <type>System.Boolean, System</type>
|
||||
public bool Free
|
||||
{
|
||||
get => _freeFeature.Value;
|
||||
@ -134,6 +182,9 @@ public class TenantQuota : IMapFrom<DbQuota>
|
||||
}
|
||||
|
||||
private readonly TenantQuotaFeatureFlag _updateFeature;
|
||||
|
||||
/// <summary>Specifies if the tenant quota is updated or not</summary>
|
||||
/// <type>System.Boolean, System</type>
|
||||
public bool Update
|
||||
{
|
||||
get => _updateFeature.Value;
|
||||
@ -141,6 +192,9 @@ public class TenantQuota : IMapFrom<DbQuota>
|
||||
}
|
||||
|
||||
private readonly TenantQuotaFeatureFlag _auditFeature;
|
||||
|
||||
/// <summary>Specifies if the audit trail is available or not</summary>
|
||||
/// <type>System.Boolean, System</type>
|
||||
public bool Audit
|
||||
{
|
||||
get => _auditFeature.Value;
|
||||
@ -148,6 +202,9 @@ public class TenantQuota : IMapFrom<DbQuota>
|
||||
}
|
||||
|
||||
private readonly TenantQuotaFeatureFlag _docsEditionFeature;
|
||||
|
||||
/// <summary>Specifies if this tenant quota is Docs edition or not</summary>
|
||||
/// <type>System.Boolean, System</type>
|
||||
public bool DocsEdition
|
||||
{
|
||||
get => _docsEditionFeature.Value;
|
||||
@ -155,6 +212,9 @@ public class TenantQuota : IMapFrom<DbQuota>
|
||||
}
|
||||
|
||||
private readonly TenantQuotaFeatureFlag _ldapFeature;
|
||||
|
||||
/// <summary>Specifies if the LDAP settings are available or not</summary>
|
||||
/// <type>System.Boolean, System</type>
|
||||
public bool Ldap
|
||||
{
|
||||
get => _ldapFeature.Value;
|
||||
@ -162,6 +222,9 @@ public class TenantQuota : IMapFrom<DbQuota>
|
||||
}
|
||||
|
||||
private readonly TenantQuotaFeatureFlag _ssoFeature;
|
||||
|
||||
/// <summary>Specifies if the SSO settings are available or not</summary>
|
||||
/// <type>System.Boolean, System</type>
|
||||
public bool Sso
|
||||
{
|
||||
get => _ssoFeature.Value;
|
||||
@ -169,6 +232,9 @@ public class TenantQuota : IMapFrom<DbQuota>
|
||||
}
|
||||
|
||||
private readonly TenantQuotaFeatureFlag _whiteLabelFeature;
|
||||
|
||||
/// <summary>Specifies if the white label settings are available or not</summary>
|
||||
/// <type>System.Boolean, System</type>
|
||||
public bool WhiteLabel
|
||||
{
|
||||
get => _whiteLabelFeature.Value;
|
||||
@ -176,6 +242,9 @@ public class TenantQuota : IMapFrom<DbQuota>
|
||||
}
|
||||
|
||||
private readonly TenantQuotaFeatureFlag _customizationFeature;
|
||||
|
||||
/// <summary>Specifies if the customization settings are available or not</summary>
|
||||
/// <type>System.Boolean, System</type>
|
||||
public bool Customization
|
||||
{
|
||||
get => _customizationFeature.Value;
|
||||
@ -183,6 +252,9 @@ public class TenantQuota : IMapFrom<DbQuota>
|
||||
}
|
||||
|
||||
private readonly TenantQuotaFeatureFlag _customFeature;
|
||||
|
||||
/// <summary>Specifies if the custom domain URL is available or not</summary>
|
||||
/// <type>System.Boolean, System</type>
|
||||
public bool Custom
|
||||
{
|
||||
get => _customFeature.Value;
|
||||
@ -190,6 +262,9 @@ public class TenantQuota : IMapFrom<DbQuota>
|
||||
}
|
||||
|
||||
private readonly TenantQuotaFeatureFlag _autoBackupRestoreFeature;
|
||||
|
||||
/// <summary>Specifies if the automatic Backup&Restore feature is available or not</summary>
|
||||
/// <type>System.Boolean, System</type>
|
||||
public bool AutoBackupRestore
|
||||
{
|
||||
get => _autoBackupRestoreFeature.Value;
|
||||
@ -197,6 +272,9 @@ public class TenantQuota : IMapFrom<DbQuota>
|
||||
}
|
||||
|
||||
private readonly TenantQuotaFeatureFlag _oauthFeature;
|
||||
|
||||
/// <summary>Specifies if Oauth is available or not</summary>
|
||||
/// <type>System.Boolean, System</type>
|
||||
public bool Oauth
|
||||
{
|
||||
get => _oauthFeature.Value;
|
||||
@ -204,6 +282,9 @@ public class TenantQuota : IMapFrom<DbQuota>
|
||||
}
|
||||
|
||||
private readonly TenantQuotaFeatureFlag _contentSearchFeature;
|
||||
|
||||
/// <summary>Specifies if the content search is available or not</summary>
|
||||
/// <type>System.Boolean, System</type>
|
||||
public bool ContentSearch
|
||||
{
|
||||
get => _contentSearchFeature.Value;
|
||||
@ -211,6 +292,9 @@ public class TenantQuota : IMapFrom<DbQuota>
|
||||
}
|
||||
|
||||
private readonly TenantQuotaFeatureFlag _thirdPartyFeature;
|
||||
|
||||
/// <summary>Specifies if the third-party accounts linking is available or not</summary>
|
||||
/// <type>System.Boolean, System</type>
|
||||
public bool ThirdParty
|
||||
{
|
||||
get => _thirdPartyFeature.Value;
|
||||
|
@ -26,6 +26,8 @@
|
||||
|
||||
namespace ASC.Core.Tenants;
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
public enum TenantTrustedDomainsType
|
||||
{
|
||||
None,
|
||||
|
@ -26,10 +26,17 @@
|
||||
|
||||
namespace ASC.Core;
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class TenantVersion
|
||||
{
|
||||
/// <summary>ID</summary>
|
||||
/// <type>System.Int32, System</type>
|
||||
public int Id { get; private set; }
|
||||
|
||||
/// <summary>Name</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string Name { get; private set; }
|
||||
|
||||
public TenantVersion() { }
|
||||
|
@ -29,6 +29,8 @@ using JsonConverterAttribute = System.Text.Json.Serialization.JsonConverterAttri
|
||||
|
||||
namespace ASC.Web.Studio.Utility;
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
// emp-invite - confirm ivite by email
|
||||
// portal-suspend - confirm portal suspending - Tenant.SetStatus(TenantStatus.Suspended)
|
||||
// portal-continue - confirm portal continuation - Tenant.SetStatus(TenantStatus.Active)
|
||||
|
@ -26,15 +26,21 @@
|
||||
|
||||
namespace ASC.Web.Core.Users;
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class DarkThemeSettings : ISettings<DarkThemeSettings>
|
||||
{
|
||||
/// <summary>ID</summary>
|
||||
/// <type>System.Guid, System</type>
|
||||
[JsonIgnore]
|
||||
public Guid ID
|
||||
{
|
||||
get { return new Guid("{38362061-066D-4C57-A23E-8953CF34EFC3}"); }
|
||||
}
|
||||
|
||||
/// <summary>Theme</summary>
|
||||
/// <type>ASC.Web.Core.Users.DarkThemeSettingsEnum, ASC.Core.Common</type>
|
||||
public DarkThemeSettingsEnum Theme { get; set; }
|
||||
|
||||
public DarkThemeSettings GetDefault()
|
||||
@ -46,6 +52,8 @@ public class DarkThemeSettings : ISettings<DarkThemeSettings>
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(JsonStringEnumConverter))]
|
||||
public enum DarkThemeSettingsEnum
|
||||
{
|
||||
|
@ -26,18 +26,40 @@
|
||||
|
||||
namespace ASC.Web.Core.WhiteLabel;
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class MailWhiteLabelSettings : ISettings<MailWhiteLabelSettings>
|
||||
{
|
||||
private readonly MailWhiteLabelSettingsHelper _mailWhiteLabelSettingsHelper;
|
||||
private readonly IConfiguration _configuration;
|
||||
|
||||
/// <summary>Specifies if the mail footer is enabled or not</summary>
|
||||
/// <type>System.Boolean, System</type>
|
||||
public bool FooterEnabled { get; set; }
|
||||
|
||||
/// <summary>Specifies if the footer with social media contacts is enabled or not</summary>
|
||||
/// <type>System.Boolean, System</type>
|
||||
public bool FooterSocialEnabled { get; set; }
|
||||
|
||||
/// <summary>Support URL</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string SupportUrl { get; set; }
|
||||
|
||||
/// <summary>Support email</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string SupportEmail { get; set; }
|
||||
|
||||
/// <summary>Sales email</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string SalesEmail { get; set; }
|
||||
|
||||
/// <summary>Demo URL</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string DemoUrl { get; set; }
|
||||
|
||||
/// <summary>Site URL</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string SiteUrl { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
|
@ -393,12 +393,28 @@ public class BackupAjaxHandler
|
||||
return Path.Combine(folder, BackupFileName);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
public class Schedule
|
||||
{
|
||||
public BackupStorageType StorageType { get; set; }
|
||||
public Dictionary<string, string> StorageParams { get; set; }
|
||||
public CronParams CronParams { get; set; }
|
||||
public int? BackupsStored { get; set; }
|
||||
{
|
||||
/// <summary>Storage type</summary>
|
||||
/// <type>ASC.Data.Backup.Contracts.BackupStorageType, ASC.Data.Backup.Core</type>
|
||||
public BackupStorageType StorageType { get; set; }
|
||||
|
||||
/// <summary>Storage parameters</summary>
|
||||
/// <type>System.Collections.Generic.Dictionary{System.String, System.String}, System.Collections.Generic</type>
|
||||
public Dictionary<string, string> StorageParams { get; set; }
|
||||
|
||||
/// <summary>Cron parameters</summary>
|
||||
/// <type>ASC.Data.Backup.BackupAjaxHandler.CronParams, ASC.Data.Backup.Core</type>
|
||||
public CronParams CronParams { get; set; }
|
||||
|
||||
/// <summary>Maximum number of the stored backup copies</summary>
|
||||
/// <type>System.Nullable{System.Int32}, System</type>
|
||||
public int? BackupsStored { get; set; }
|
||||
|
||||
/// <summary>Last backup creation time</summary>
|
||||
/// <type>System.DateTime, System</type>
|
||||
public DateTime LastBackupTime { get; set; }
|
||||
}
|
||||
|
||||
|
@ -46,12 +46,28 @@ public class StartBackupRequest
|
||||
public Dictionary<string, string> StorageParams { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
public class BackupHistoryRecord
|
||||
{
|
||||
/// <summary>Backup ID</summary>
|
||||
/// <type>System.Guid, System</type>
|
||||
public Guid Id { get; set; }
|
||||
|
||||
/// <summary>File name</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string FileName { get; set; }
|
||||
|
||||
/// <summary>Storage type</summary>
|
||||
/// <type>ASC.Data.Backup.Contracts.BackupStorageType, ASC.Data.Backup.Core</type>
|
||||
public BackupStorageType StorageType { get; set; }
|
||||
|
||||
/// <summary>Creation date</summary>
|
||||
/// <type>System.DateTime, System</type>
|
||||
public DateTime CreatedOn { get; set; }
|
||||
|
||||
/// <summary>Expiration date</summary>
|
||||
/// <type>System.DateTime, System</type>
|
||||
public DateTime ExpiresOn { get; set; }
|
||||
}
|
||||
|
||||
|
@ -3,12 +3,13 @@
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<GenerateDocumentationFile>True</GenerateDocumentationFile>
|
||||
<NoWarn>1701;1702;NU1701;1591;</NoWarn>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
|
||||
<DebugType>none</DebugType>
|
||||
<DebugSymbols>false</DebugSymbols>
|
||||
<NoWarn>1701;1702;NU1701;</NoWarn>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -26,10 +26,17 @@
|
||||
|
||||
namespace ASC.Data.Reassigns;
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
[Transient]
|
||||
public class ReassignProgressItem : DistributedTaskProgress
|
||||
{
|
||||
/// <summary>The user whose data is reassigned</summary>
|
||||
/// <type>System.Guid, System</type>
|
||||
public Guid FromUser { get; private set; }
|
||||
|
||||
/// <summary>The user to whom this data is reassigned</summary>
|
||||
/// <type>System.Guid, System</type>
|
||||
public Guid ToUser { get; private set; }
|
||||
|
||||
private readonly IServiceScopeFactory _serviceScopeFactory;
|
||||
|
@ -26,10 +26,17 @@
|
||||
|
||||
namespace ASC.Data.Reassigns;
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
[Transient]
|
||||
public class RemoveProgressItem : DistributedTaskProgress
|
||||
{
|
||||
/// <summary>ID of the user whose data is deleted</summary>
|
||||
/// <type>System.Guid, System</type>
|
||||
public Guid FromUser { get; private set; }
|
||||
|
||||
/// <summary>The user whose data is deleted</summary>
|
||||
/// <type>ASC.Core.Users.UserInfo, ASC.Core.Common</type>
|
||||
public UserInfo User { get; private set; }
|
||||
|
||||
private readonly IDictionary<string, StringValues> _httpHeaders;
|
||||
|
@ -79,10 +79,18 @@ public class BaseStorageSettingsListener
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
[Serializable]
|
||||
public abstract class BaseStorageSettings<T> : ISettings<BaseStorageSettings<T>> where T : class, ISettings<T>, new()
|
||||
{
|
||||
/// <summary>Storage name</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string Module { get; set; }
|
||||
|
||||
/// <summary>Storage properties</summary>
|
||||
/// <type>System.Collections.Generic.Dictionary{System.String, System.String}, System.Collections.Generic</type>
|
||||
public Dictionary<string, string> Props { get; set; }
|
||||
public virtual Func<DataStoreConsumer, DataStoreConsumer> Switch => d => d;
|
||||
public abstract Guid ID { get; }
|
||||
@ -94,6 +102,8 @@ public abstract class BaseStorageSettings<T> : ISettings<BaseStorageSettings<T>>
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class StorageSettings : BaseStorageSettings<StorageSettings>, ISettings<StorageSettings>
|
||||
{
|
||||
@ -106,6 +116,8 @@ public class StorageSettings : BaseStorageSettings<StorageSettings>, ISettings<S
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
[Scope]
|
||||
[Serializable]
|
||||
public class CdnStorageSettings : BaseStorageSettings<CdnStorageSettings>, ISettings<CdnStorageSettings>
|
||||
|
@ -112,16 +112,17 @@ public interface IDataStore
|
||||
///</summary>
|
||||
///<param name="domain"></param>
|
||||
///<param name="path"></param>
|
||||
///<param name="offset"></param>
|
||||
///<returns></returns>
|
||||
Task<Stream> GetReadStreamAsync(string domain, string path, long offset);
|
||||
|
||||
///<summary>
|
||||
/// Saves the contents of the stream in the repository.
|
||||
///</ Summary>
|
||||
///</summary>
|
||||
/// <param Name="domain"> </param>
|
||||
/// <param Name="path"> </param>
|
||||
/// <param Name="stream"> flow. Is read from the current position! Desirable to set to 0 when the transmission MemoryStream instance </param>
|
||||
/// <returns> </Returns>
|
||||
/// <returns> </returns>
|
||||
Task<Uri> SaveAsync(string domain, string path, Stream stream);
|
||||
|
||||
/// <summary>
|
||||
@ -198,7 +199,7 @@ public interface IDataStore
|
||||
/// Deletes files
|
||||
///</summary>
|
||||
///<param name="domain"></param>
|
||||
///<param name="listPaths"></param>
|
||||
///<param name="paths"></param>
|
||||
Task DeleteFilesAsync(string domain, List<string> paths);
|
||||
|
||||
///<summary>
|
||||
@ -226,6 +227,7 @@ public interface IDataStore
|
||||
///<param name="srcpath"></param>
|
||||
///<param name="newdomain"></param>
|
||||
///<param name="newpath"></param>
|
||||
///<param name="quotaCheckFileSize"></param>
|
||||
///<returns></returns>
|
||||
Task<Uri> MoveAsync(string srcdomain, string srcpath, string newdomain, string newpath, bool quotaCheckFileSize = true);
|
||||
|
||||
|
@ -26,6 +26,8 @@
|
||||
|
||||
namespace ASC.FederatedLogin.LoginProviders;
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
public enum LoginProviderEnum
|
||||
{
|
||||
Facebook,
|
||||
|
@ -28,9 +28,13 @@ using System.Text.Json.Serialization;
|
||||
|
||||
namespace ASC.IPSecurity;
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class IPRestrictionsSettings : ISettings<IPRestrictionsSettings>
|
||||
{
|
||||
/// <summary>Specifies if the IP restrictions are enabled or not</summary>
|
||||
/// <type>System.Boolean, System</type>
|
||||
public bool Enable { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
|
@ -26,17 +26,29 @@
|
||||
|
||||
namespace ASC.IPSecurity;
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class IPRestriction : IpRestrictionBase, IMapFrom<TenantIpRestrictions>
|
||||
{
|
||||
/// <summary>Restiction ID</summary>
|
||||
/// <type>System.Int32, System</type>
|
||||
public int Id { get; set; }
|
||||
|
||||
/// <summary>Tenant ID</summary>
|
||||
/// <type>System.Int32, System</type>
|
||||
public int TenantId { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
public class IpRestrictionBase
|
||||
{
|
||||
/// <summary>IP address</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string Ip { get; set; }
|
||||
|
||||
/// <summary>Specifies if this address is for administrator users only or not</summary>
|
||||
/// <type>System.Boolean, System</type>
|
||||
public bool ForAdmin { get; set; }
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ public abstract class FormatterState
|
||||
/// <summary>
|
||||
/// Public constructor.
|
||||
/// </summary>
|
||||
/// <param name="f">The parent formatter.</param>
|
||||
/// <param name="formatter">The parent formatter.</param>
|
||||
protected FormatterState(TextileFormatter formatter)
|
||||
{
|
||||
Formatter = formatter;
|
||||
@ -72,15 +72,15 @@ public abstract class FormatterState
|
||||
/// <param name="input">The line of text.</param>
|
||||
public abstract void FormatLine(string input);
|
||||
|
||||
/// <summary>
|
||||
/// Returns whether this state can last for more than one line.
|
||||
/// </summary>
|
||||
/// <returns>A boolean value stating whether this state is only for one line.</returns>
|
||||
/// This method should return true only if this state is genuinely
|
||||
/// multi-line. For example, a header text is only one line long. You can
|
||||
/// have several consecutive lines of header texts, but they are not the same
|
||||
/// header - just several headers one after the other.
|
||||
/// Bulleted and numbered lists are good examples of multi-line states.
|
||||
///// <summary>
|
||||
///// Returns whether this state can last for more than one line.
|
||||
///// </summary>
|
||||
///// <returns>A boolean value stating whether this state is only for one line.</returns>
|
||||
///// This method should return true only if this state is genuinely
|
||||
///// multi-line. For example, a header text is only one line long. You can
|
||||
///// have several consecutive lines of header texts, but they are not the same
|
||||
///// header - just several headers one after the other.
|
||||
///// Bulleted and numbered lists are good examples of multi-line states.
|
||||
//abstract public bool IsOneLineOnly();
|
||||
|
||||
/// <summary>
|
||||
@ -93,9 +93,7 @@ public abstract class FormatterState
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="actualTag"></param>
|
||||
/// <param name="alignNfo"></param>
|
||||
/// <param name="attNfo"></param>
|
||||
/// <param name="other"></param>
|
||||
/// <returns></returns>
|
||||
public virtual bool ShouldNestState(FormatterState other)
|
||||
{
|
||||
|
@ -3,6 +3,8 @@
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<GenerateDocumentationFile>True</GenerateDocumentationFile>
|
||||
<NoWarn>1701;1702;1591</NoWarn>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
|
||||
|
@ -26,14 +26,35 @@
|
||||
|
||||
namespace ASC.Webhooks.Core;
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
public class Webhook : IMapFrom<DbWebhook>
|
||||
{
|
||||
/// <summary>ID</summary>
|
||||
/// <type>System.Int32, System</type>
|
||||
public int Id { get; set; }
|
||||
|
||||
/// <summary>Route</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string Route { get; set; }
|
||||
|
||||
/// <summary>Method</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string Method { get; set; }
|
||||
|
||||
/// <summary>Specifies if a webhook is disabled or not</summary>
|
||||
/// <type>System.Boolean, System</type>
|
||||
public bool Disable { get; set; }
|
||||
|
||||
/// <summary>Name</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string Name { get => WebHookResource.ResourceManager.GetString(Endpoint) ?? ""; }
|
||||
|
||||
/// <summary>Description</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string Description { get => WebHookResource.ResourceManager.GetString($"{Endpoint}_Description") ?? ""; }
|
||||
|
||||
/// <summary>Endpoint</summary>
|
||||
/// <type>System.String, System</type>
|
||||
private string Endpoint { get => $"{Method}|{Route}"; }
|
||||
}
|
@ -48,6 +48,8 @@ var logger = LogManager.Setup()
|
||||
try
|
||||
{
|
||||
logger.Info("Configuring web host ({applicationContext})...", AppName);
|
||||
|
||||
builder.Logging.ClearProviders();
|
||||
builder.Host.ConfigureDefault();
|
||||
|
||||
var startup = new Startup(builder.Configuration, builder.Environment);
|
||||
|
@ -47,7 +47,9 @@ var logger = LogManager.Setup()
|
||||
|
||||
try
|
||||
{
|
||||
logger.Info("Configuring web host ({applicationContext})...", AppName);
|
||||
logger.Info("Configuring web host ({applicationContext})...", AppName);
|
||||
|
||||
builder.Logging.ClearProviders();
|
||||
builder.Host.ConfigureDefault();
|
||||
|
||||
var startup = new Startup(builder.Configuration, builder.Environment);
|
||||
|
@ -1,5 +1,7 @@
|
||||
namespace ASC.AuditTrail.Types;
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
[EnumExtensions]
|
||||
public enum ActionType
|
||||
{
|
||||
|
@ -1,5 +1,7 @@
|
||||
namespace ASC.AuditTrail.Types;
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
[EnumExtensions]
|
||||
public enum EntryType
|
||||
{
|
||||
|
@ -1,5 +1,7 @@
|
||||
namespace ASC.AuditTrail.Types;
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
[EnumExtensions]
|
||||
public enum ModuleType
|
||||
{
|
||||
|
@ -1,5 +1,7 @@
|
||||
namespace ASC.AuditTrail.Types;
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
[EnumExtensions]
|
||||
public enum ProductType
|
||||
{
|
||||
|
@ -53,7 +53,10 @@ var logger = LogManager.Setup()
|
||||
try
|
||||
{
|
||||
logger.Info("Configuring web host ({applicationContext})...", AppName);
|
||||
|
||||
builder.Logging.ClearProviders();
|
||||
builder.Host.ConfigureDefault();
|
||||
|
||||
builder.Services.AddClearEventsServices(builder.Configuration);
|
||||
|
||||
builder.Host.ConfigureContainer<ContainerBuilder>((context, builder) =>
|
||||
|
@ -50,6 +50,8 @@ var logger = LogManager.Setup()
|
||||
try
|
||||
{
|
||||
logger.Info("Configuring web host ({applicationContext})...", AppName);
|
||||
|
||||
builder.Logging.ClearProviders();
|
||||
builder.Host.ConfigureDefault();
|
||||
builder.WebHost.ConfigureDefaultKestrel();
|
||||
|
||||
|
@ -9,12 +9,14 @@
|
||||
<DisableImplicitComponentsAnalyzers>true</DisableImplicitComponentsAnalyzers>
|
||||
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<GenerateDocumentationFile>True</GenerateDocumentationFile>
|
||||
<NoWarn>1701;1702;1591</NoWarn>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
|
||||
<DebugType>none</DebugType>
|
||||
<DebugSymbols>false</DebugSymbols>
|
||||
</PropertyGroup>
|
||||
</PropertyGroup>
|
||||
<Target Name="ChangeAliasesOfStrongNameAssemblies" BeforeTargets="FindReferenceAssembliesForReferences;ResolveReferences">
|
||||
<ItemGroup>
|
||||
<ReferencePath Condition="'%(FileName)' == 'MySqlConnector'">
|
||||
|
@ -26,6 +26,10 @@
|
||||
|
||||
namespace ASC.Data.Backup.Controllers;
|
||||
|
||||
/// <summary>
|
||||
/// Backup API.
|
||||
/// </summary>
|
||||
/// <name>backup</name>
|
||||
[Scope]
|
||||
[DefaultRoute]
|
||||
[ApiController]
|
||||
@ -48,10 +52,12 @@ public class BackupController : ControllerBase
|
||||
_eventBus = eventBus;
|
||||
}
|
||||
/// <summary>
|
||||
/// Returns the backup schedule of the current portal
|
||||
/// Returns the backup schedule of the current portal.
|
||||
/// </summary>
|
||||
/// <category>Backup</category>
|
||||
/// <returns>Backup Schedule</returns>
|
||||
/// <short>Get the backup schedule</short>
|
||||
/// <returns type="ASC.Data.Backup.BackupAjaxHandler.Schedule, ASC.Data.Backup">Backup schedule</returns>
|
||||
/// <httpMethod>GET</httpMethod>
|
||||
/// <path>api/2.0/backup/getbackupschedule</path>
|
||||
[HttpGet("getbackupschedule")]
|
||||
public async Task<BackupAjaxHandler.Schedule> GetBackupSchedule()
|
||||
{
|
||||
@ -59,33 +65,36 @@ public class BackupController : ControllerBase
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create the backup schedule of the current portal
|
||||
/// Creates the backup schedule of the current portal with the parameters specified in the request.
|
||||
/// </summary>
|
||||
/// <param name="storageType">Storage type</param>
|
||||
/// <param name="storageParams">Storage parameters</param>
|
||||
/// <param name="backupsStored">Max of the backup's stored copies</param>
|
||||
/// <param name="cronParams">Cron parameters</param>
|
||||
/// <category>Backup</category>
|
||||
/// <short>Create the backup schedule</short>
|
||||
/// <param type="ASC.Data.Backup.ApiModels.BackupScheduleDto, ASC.Data.Backup" name="inDto">Backup schedule parameters</param>
|
||||
/// <returns type="System.Boolean, System">Boolean value: true if the operation is successful</returns>
|
||||
/// <httpMethod>POST</httpMethod>
|
||||
/// <path>api/2.0/backup/createbackupschedule</path>
|
||||
[HttpPost("createbackupschedule")]
|
||||
public async Task<bool> CreateBackupScheduleAsync(BackupScheduleDto backupSchedule)
|
||||
public async Task<bool> CreateBackupScheduleAsync(BackupScheduleDto inDto)
|
||||
{
|
||||
var storageType = backupSchedule.StorageType == null ? BackupStorageType.Documents : (BackupStorageType)Int32.Parse(backupSchedule.StorageType);
|
||||
var storageParams = backupSchedule.StorageParams == null ? new Dictionary<string, string>() : backupSchedule.StorageParams.ToDictionary(r => r.Key.ToString(), r => r.Value.ToString());
|
||||
var backupStored = backupSchedule.BackupsStored == null ? 0 : Int32.Parse(backupSchedule.BackupsStored);
|
||||
var storageType = inDto.StorageType == null ? BackupStorageType.Documents : (BackupStorageType)Int32.Parse(inDto.StorageType);
|
||||
var storageParams = inDto.StorageParams == null ? new Dictionary<string, string>() : inDto.StorageParams.ToDictionary(r => r.Key.ToString(), r => r.Value.ToString());
|
||||
var backupStored = inDto.BackupsStored == null ? 0 : Int32.Parse(inDto.BackupsStored);
|
||||
var cron = new CronParams()
|
||||
{
|
||||
Period = backupSchedule.CronParams.Period == null ? BackupPeriod.EveryDay : (BackupPeriod)Int32.Parse(backupSchedule.CronParams.Period),
|
||||
Hour = backupSchedule.CronParams.Hour == null ? 0 : Int32.Parse(backupSchedule.CronParams.Hour),
|
||||
Day = backupSchedule.CronParams.Day == null ? 0 : Int32.Parse(backupSchedule.CronParams.Day),
|
||||
Period = inDto.CronParams.Period == null ? BackupPeriod.EveryDay : (BackupPeriod)Int32.Parse(inDto.CronParams.Period),
|
||||
Hour = inDto.CronParams.Hour == null ? 0 : Int32.Parse(inDto.CronParams.Hour),
|
||||
Day = inDto.CronParams.Day == null ? 0 : Int32.Parse(inDto.CronParams.Day),
|
||||
};
|
||||
await _backupHandler.CreateScheduleAsync(storageType, storageParams, backupStored, cron);
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Delete the backup schedule of the current portal
|
||||
/// Deletes the backup schedule of the current portal.
|
||||
/// </summary>
|
||||
/// <category>Backup</category>
|
||||
/// <short>Delete the backup schedule</short>
|
||||
/// <returns type="System.Boolean, System">Boolean value: true if the operation is successful</returns>
|
||||
/// <httpMethod>DELETE</httpMethod>
|
||||
/// <path>api/2.0/backup/deletebackupschedule</path>
|
||||
[HttpDelete("deletebackupschedule")]
|
||||
public async Task<bool> DeleteBackupSchedule()
|
||||
{
|
||||
@ -95,18 +104,19 @@ public class BackupController : ControllerBase
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Start a backup of the current portal
|
||||
/// Starts the backup of the current portal with the parameters specified in the request.
|
||||
/// </summary>
|
||||
/// <param name="storageType">Storage Type</param>
|
||||
/// <param name="storageParams">Storage Params</param>
|
||||
/// <category>Backup</category>
|
||||
/// <returns>Backup Progress</returns>
|
||||
/// <short>Start the backup</short>
|
||||
/// <param type="ASC.Data.Backup.ApiModels.BackupDto, ASC.Data.Backup" name="inDto">Backup parameters</param>
|
||||
/// <returns type="System.Object, System">Backup progress: completed or not, progress percentage, error, tenant ID, backup progress item (Backup, Restore, Transfer), link</returns>
|
||||
/// <httpMethod>POST</httpMethod>
|
||||
/// <path>api/2.0/backup/startbackup</path>
|
||||
[AllowNotPayment]
|
||||
[HttpPost("startbackup")]
|
||||
public async Task<BackupProgress> StartBackupAsync(BackupDto backup)
|
||||
public async Task<BackupProgress> StartBackupAsync(BackupDto inDto)
|
||||
{
|
||||
var storageType = backup.StorageType == null ? BackupStorageType.Documents : (BackupStorageType)Int32.Parse(backup.StorageType);
|
||||
var storageParams = backup.StorageParams == null ? new Dictionary<string, string>() : backup.StorageParams.ToDictionary(r => r.Key.ToString(), r => r.Value.ToString());
|
||||
var storageType = inDto.StorageType == null ? BackupStorageType.Documents : (BackupStorageType)Int32.Parse(inDto.StorageType);
|
||||
var storageParams = inDto.StorageParams == null ? new Dictionary<string, string>() : inDto.StorageParams.ToDictionary(r => r.Key.ToString(), r => r.Value.ToString());
|
||||
|
||||
_eventBus.Publish(new BackupRequestIntegrationEvent(
|
||||
tenantId: _tenantId,
|
||||
@ -119,10 +129,12 @@ public class BackupController : ControllerBase
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the progress of the started backup
|
||||
/// Returns the progress of the started backup.
|
||||
/// </summary>
|
||||
/// <category>Backup</category>
|
||||
/// <returns>Backup Progress</returns>
|
||||
/// <short>Get the backup progress</short>
|
||||
/// <returns type="System.Object, System">Backup progress: completed or not, progress percentage, error, tenant ID, backup progress item (Backup, Restore, Transfer), link</returns>
|
||||
/// <httpMethod>GET</httpMethod>
|
||||
/// <path>api/2.0/backup/getbackupprogress</path>
|
||||
[AllowNotPayment]
|
||||
[HttpGet("getbackupprogress")]
|
||||
public async Task<BackupProgress> GetBackupProgressAsync()
|
||||
@ -131,10 +143,13 @@ public class BackupController : ControllerBase
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the backup history of the started backup
|
||||
/// Returns the history of the started backup.
|
||||
/// </summary>
|
||||
/// <category>Backup</category>
|
||||
/// <returns>Backup History</returns>
|
||||
/// <short>Get the backup history</short>
|
||||
/// <returns type="ASC.Data.Backup.Contracts.BackupHistoryRecord, ASC.Data.Backup.Core">List of backup history records</returns>
|
||||
/// <httpMethod>GET</httpMethod>
|
||||
/// <path>api/2.0/backup/getbackuphistory</path>
|
||||
/// <collection>list</collection>
|
||||
[HttpGet("getbackuphistory")]
|
||||
public async Task<List<BackupHistoryRecord>> GetBackupHistory()
|
||||
{
|
||||
@ -142,9 +157,13 @@ public class BackupController : ControllerBase
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Delete the backup with the specified id
|
||||
/// Deletes the backup with the ID specified in the request.
|
||||
/// </summary>
|
||||
/// <category>Backup</category>
|
||||
/// <short>Delete the backup</short>
|
||||
/// <param type="System.Guid, System" method="url" name="id">Backup ID</param>
|
||||
/// <returns type="System.Boolean, System">Boolean value: true if the operation is successful</returns>
|
||||
/// <httpMethod>DELETE</httpMethod>
|
||||
/// <path>api/2.0/backup/deletebackup/{id}</path>
|
||||
[HttpDelete("deletebackup/{id}")]
|
||||
public async Task<bool> DeleteBackup(Guid id)
|
||||
{
|
||||
@ -153,10 +172,12 @@ public class BackupController : ControllerBase
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Delete all backups of the current portal
|
||||
/// Deletes the backup history of the current portal.
|
||||
/// </summary>
|
||||
/// <category>Backup</category>
|
||||
/// <returns>Backup History</returns>
|
||||
/// <short>Delete the backup history</short>
|
||||
/// <returns type="System.Boolean, System">Boolean value: true if the operation is successful</returns>
|
||||
/// <httpMethod>DELETE</httpMethod>
|
||||
/// <path>api/2.0/backup/deletebackuphistory</path>
|
||||
[HttpDelete("deletebackuphistory")]
|
||||
public async Task<bool> DeleteBackupHistory()
|
||||
{
|
||||
@ -165,26 +186,25 @@ public class BackupController : ControllerBase
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Start a data restore of the current portal
|
||||
/// Starts the data restoring process of the current portal with the parameters specified in the request.
|
||||
/// </summary>
|
||||
/// <param name="backupId">Backup Id</param>
|
||||
/// <param name="storageType">Storage Type</param>
|
||||
/// <param name="storageParams">Storage Params</param>
|
||||
/// <param name="notify">Notify about backup to users</param>
|
||||
/// <category>Backup</category>
|
||||
/// <returns>Restore Progress</returns>
|
||||
/// <short>Start the restoring process</short>
|
||||
/// <param type="ASC.Data.Backup.ApiModels.BackupRestoreDto, ASC.Data.Backup" name="inDto">Restoring parameters</param>
|
||||
/// <returns type="System.Object, System">Backup progress: completed or not, progress percentage, error, tenant ID, backup progress item (Backup, Restore, Transfer), link</returns>
|
||||
/// <httpMethod>POST</httpMethod>
|
||||
/// <path>api/2.0/backup/startrestore</path>
|
||||
[HttpPost("startrestore")]
|
||||
public async Task<BackupProgress> StartBackupRestoreAsync(BackupRestoreDto backupRestore)
|
||||
public async Task<BackupProgress> StartBackupRestoreAsync(BackupRestoreDto inDto)
|
||||
{
|
||||
var storageParams = backupRestore.StorageParams == null ? new Dictionary<string, string>() : backupRestore.StorageParams.ToDictionary(r => r.Key.ToString(), r => r.Value.ToString());
|
||||
var storageParams = inDto.StorageParams == null ? new Dictionary<string, string>() : inDto.StorageParams.ToDictionary(r => r.Key.ToString(), r => r.Value.ToString());
|
||||
|
||||
_eventBus.Publish(new BackupRestoreRequestIntegrationEvent(
|
||||
tenantId: _tenantId,
|
||||
createBy: _currentUserId,
|
||||
storageParams: storageParams,
|
||||
storageType: (BackupStorageType)Int32.Parse(backupRestore.StorageType.ToString()),
|
||||
notify: backupRestore.Notify,
|
||||
backupId: backupRestore.BackupId
|
||||
storageType: (BackupStorageType)Int32.Parse(inDto.StorageType.ToString()),
|
||||
notify: inDto.Notify,
|
||||
backupId: inDto.BackupId
|
||||
));
|
||||
|
||||
|
||||
@ -192,10 +212,13 @@ public class BackupController : ControllerBase
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the progress of the started restore
|
||||
/// Returns the progress of the started restoring process.
|
||||
/// </summary>
|
||||
/// <category>Backup</category>
|
||||
/// <returns>Restore Progress</returns>
|
||||
/// <short>Get the restoring progress</short>
|
||||
/// <returns type="System.Object, System">Backup progress: completed or not, progress percentage, error, tenant ID, backup progress item (Backup, Restore, Transfer), link</returns>
|
||||
/// <httpMethod>GET</httpMethod>
|
||||
/// <path>api/2.0/backup/getrestoreprogress</path>
|
||||
/// <requiresAuthorization>false</requiresAuthorization>
|
||||
[HttpGet("getrestoreprogress")] //NOTE: this method doesn't check payment!!!
|
||||
[AllowAnonymous]
|
||||
[AllowNotPayment]
|
||||
@ -204,6 +227,13 @@ public class BackupController : ControllerBase
|
||||
return await _backupHandler.GetRestoreProgressAsync();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a path to the temporary folder with the stored backup.
|
||||
/// </summary>
|
||||
/// <short>Get the temporary backup folder</short>
|
||||
/// <returns type="System.Object, System">Path to the temporary folder with the stored backup</returns>
|
||||
/// <httpMethod>GET</httpMethod>
|
||||
/// <path>api/2.0/backup/backuptmp</path>
|
||||
///<visible>false</visible>
|
||||
[HttpGet("backuptmp")]
|
||||
public object GetTempPath()
|
||||
|
@ -26,8 +26,16 @@
|
||||
|
||||
namespace ASC.Data.Backup.ApiModels;
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
public class BackupDto
|
||||
{
|
||||
/// <summary>Storage type</summary>
|
||||
/// <type>System.String, System</type>
|
||||
/// <example>Documents</example>
|
||||
public string StorageType { get; set; }
|
||||
|
||||
/// <summary>Storage parameters</summary>
|
||||
/// <type>System.Collections.Generic.IEnumerable{ASC.Api.Collections.ItemKeyValuePair{System.Object, System.Object}}, System.Collections.Generic</type>
|
||||
public IEnumerable<ItemKeyValuePair<object, object>> StorageParams { get; set; }
|
||||
}
|
||||
|
@ -26,10 +26,24 @@
|
||||
|
||||
namespace ASC.Data.Backup.ApiModels;
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
public class BackupRestoreDto
|
||||
{
|
||||
/// <summary>Backup ID</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string BackupId { get; set; }
|
||||
|
||||
/// <summary>Storage type</summary>
|
||||
/// <type>System.Object, System</type>
|
||||
/// <example>Documents</example>
|
||||
public object StorageType { get; set; }
|
||||
|
||||
/// <summary>Storage parameters</summary>
|
||||
/// <type>System.Collections.Generic.IEnumerable{ASC.Api.Collections.ItemKeyValuePair{System.Object, System.Object}}, System.Collections.Generic</type>
|
||||
public IEnumerable<ItemKeyValuePair<object, object>> StorageParams { get; set; }
|
||||
|
||||
/// <summary>Notifies users about portal restoring process or not</summary>
|
||||
/// <type>System.Boolean, System</type>
|
||||
public bool Notify { get; set; }
|
||||
}
|
||||
|
@ -26,17 +26,44 @@
|
||||
|
||||
namespace ASC.Data.Backup.ApiModels;
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
public class BackupScheduleDto
|
||||
{
|
||||
/// <summary>Storage type</summary>
|
||||
/// <type>System.String, System</type>
|
||||
/// <example>Documents</example>
|
||||
public string StorageType { get; set; }
|
||||
|
||||
/// <summary>Storage parameters</summary>
|
||||
/// <type>System.Collections.Generic.IEnumerable{ASC.Api.Collections.ItemKeyValuePair{System.Object, System.Object}}, System.Collections.Generic</type>
|
||||
public IEnumerable<ItemKeyValuePair<object, object>> StorageParams { get; set; }
|
||||
|
||||
/// <summary>Maximum number of the stored backup copies</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string BackupsStored { get; set; }
|
||||
|
||||
/// <summary>Cron parameters</summary>
|
||||
/// <type>ASC.Data.Backup.ApiModels.Cron, ASC.Data.Backup</type>
|
||||
public Cron CronParams { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
public class Cron
|
||||
{
|
||||
/// <summary>Period</summary>
|
||||
/// <type>System.String, System</type>
|
||||
/// <example>0</example>
|
||||
public string Period { get; set; }
|
||||
|
||||
/// <summary>Hour</summary>
|
||||
/// <type>System.String, System</type>
|
||||
/// <example>0</example>
|
||||
public string Hour { get; set; }
|
||||
|
||||
/// <summary>Day</summary>
|
||||
/// <type>System.String, System</type>
|
||||
/// <example>0</example>
|
||||
public string Day { get; set; }
|
||||
}
|
||||
|
@ -50,6 +50,7 @@ try
|
||||
{
|
||||
logger.Info("Configuring web host ({applicationContext})...", AppName);
|
||||
|
||||
builder.Logging.ClearProviders();
|
||||
builder.Host.ConfigureDefault();
|
||||
builder.WebHost.ConfigureDefaultKestrel();
|
||||
|
||||
|
@ -50,6 +50,8 @@ var logger = LogManager.Setup()
|
||||
try
|
||||
{
|
||||
logger.Info("Configuring web host ({applicationContext})...", AppName);
|
||||
|
||||
builder.Logging.ClearProviders();
|
||||
builder.Host.ConfigureDefault();
|
||||
|
||||
var startup = new Startup(builder.Configuration, builder.Environment);
|
||||
|
@ -49,6 +49,8 @@ var logger = LogManager
|
||||
try
|
||||
{
|
||||
logger.Info("Configuring web host ({applicationContext})...", AppName);
|
||||
|
||||
builder.Logging.ClearProviders();
|
||||
builder.Host.ConfigureDefault();
|
||||
builder.WebHost.ConfigureDefaultKestrel();
|
||||
|
||||
|
@ -1,16 +1,4 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Debug",
|
||||
"Microsoft": "Warning",
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
},
|
||||
"EventLog": {
|
||||
"LogLevel": {
|
||||
"Default": "None"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"AllowedHosts": "*",
|
||||
"core": {
|
||||
"base-domain": "",
|
||||
|
@ -16,6 +16,8 @@
|
||||
<target name="web" type="File" fileName="${var:dir}${var:name}.log" />
|
||||
<target name="sql" type="File" fileName="${var:dir}${var:name}.sql.log" layout="${date:universalTime=true:format=yyyy-MM-dd HH\:mm\:ss,fff}|${threadid}|${event-properties:item=elapsed}|${replace:inner=${event-properties:item=commandText}:searchFor=\\r\\n|\\s:replaceWith= :regex=true}|${event-properties:item=parameters}"/>
|
||||
<target name="ownFile-web" type="File" fileName="${var:dir}${var:name}.asp.log" layout="${longdate}|${event-properties:item=EventId_Id}|${uppercase:${level}}|${logger}|${message} ${exception:format=tostring}|url: ${aspnet-request-url}|action: ${aspnet-mvc-action}" />
|
||||
<target name="lifetimeConsole" type="Console" layout="${MicrosoftConsoleLayout}" />
|
||||
|
||||
<target type="AWSTarget" name="aws" logGroup="/asc/docspace/cluster/cluster_name/general" region="us-east-1" LogStreamNamePrefix="${hostname} - ${application-context}">
|
||||
<layout xsi:type="JsonLayout" includeEventProperties="true" includeScopeProperties="true" maxRecursionLimit="2">
|
||||
<attribute name="date" layout="${date:format=yyyy-MM-dd HH\:mm\:ss,fff}" />
|
||||
@ -46,8 +48,14 @@
|
||||
<filters defaultAction="Log">
|
||||
<when condition="equals('${scope-property:RequestPath}', '/health')" action="Ignore" />
|
||||
</filters>
|
||||
</logger>
|
||||
<logger name="Microsoft.Hosting.Lifetime" minlevel="Info" writeTo="lifetimeConsole, ownFile-web" final="true" />
|
||||
<logger name="Microsoft.AspNetCore.Hosting.Diagnostics" minlevel="Debug" writeTo="ownFile-web" final="true">
|
||||
<filters defaultAction="Log">
|
||||
<when condition="equals('${scope-property:RequestPath}', '/health')" action="Ignore" />
|
||||
</filters>
|
||||
</logger>
|
||||
<logger name="Microsoft.AspNetCore.Hosting.Diagnostics" minlevel="Debug" writeTo="ownFile-web" final="true" />
|
||||
<logger name="Microsoft.*" maxlevel="Off" final="true" />
|
||||
<logger name="System.Net.Http.*" maxlevel="Info" final="true" />
|
||||
</rules>
|
||||
</nlog>
|
@ -12202,6 +12202,122 @@
|
||||
</translation>
|
||||
</translations>
|
||||
</concept_node>
|
||||
<concept_node>
|
||||
<name>ErrorEmptyList</name>
|
||||
<description/>
|
||||
<comment/>
|
||||
<default_text/>
|
||||
<translations>
|
||||
<translation>
|
||||
<language>az-Latn-AZ</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>bg-BG</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>cs-CZ</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>de-DE</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>el-GR</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>en-US</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>es-ES</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>fi-FI</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>fr-FR</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>hy-AM</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>it-IT</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>ja-JP</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>ko-KR</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>lo-LA</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>lv-LV</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>nl-NL</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>pl-PL</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>pt-BR</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>pt-PT</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>ro-RO</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>ru-RU</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>sk-SK</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>sl-SI</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>tr-TR</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>uk-UA</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>vi-VN</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>zh-CN</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
</translations>
|
||||
</concept_node>
|
||||
<concept_node>
|
||||
<name>ErrorInternalServer</name>
|
||||
<description/>
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "docspace",
|
||||
"version": "1.1.1",
|
||||
"version": "1.1.2",
|
||||
"private": true,
|
||||
"workspaces": {
|
||||
"packages": [
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@docspace/client",
|
||||
"version": "1.1.1",
|
||||
"version": "1.1.2",
|
||||
"private": true,
|
||||
"homepage": "",
|
||||
"scripts": {
|
||||
|
@ -350,6 +350,8 @@ const FilesSelector = ({
|
||||
setIsRequestRunning(false);
|
||||
clearActiveOperations(fileIds, folderIds);
|
||||
});
|
||||
} else {
|
||||
toastr.error(t("Common:ErrorEmptyList"));
|
||||
}
|
||||
} else {
|
||||
setIsRequestRunning(true);
|
||||
@ -553,9 +555,11 @@ export default inject(
|
||||
isMove || isCopy || isRestoreAll
|
||||
? isRestoreAll
|
||||
? filesList
|
||||
: selection.length
|
||||
: selection.length > 0 && selection[0] != null
|
||||
? selection
|
||||
: [bufferSelection]
|
||||
: bufferSelection != null
|
||||
? [bufferSelection]
|
||||
: []
|
||||
: [];
|
||||
|
||||
const selectionsWithoutEditing = isRestoreAll
|
||||
|
@ -143,7 +143,12 @@ const AboutContent = (props) => {
|
||||
ONLYOFFICE DocSpace
|
||||
</ColorTheme>
|
||||
|
||||
<Text className="row-el select-el" fontSize="13px" fontWeight="600">
|
||||
<Text
|
||||
className="row-el select-el"
|
||||
fontSize="13px"
|
||||
fontWeight="600"
|
||||
title={`${BUILD_AT}`}
|
||||
>
|
||||
v.
|
||||
<span className="version-document-management">
|
||||
{buildVersionInfo.docspace}
|
||||
|
@ -234,7 +234,14 @@ const useFiles = ({
|
||||
|
||||
if (filter) {
|
||||
if (isRooms) {
|
||||
return fetchRooms(null, filter);
|
||||
return fetchRooms(
|
||||
null,
|
||||
filter,
|
||||
undefined,
|
||||
undefined,
|
||||
undefined,
|
||||
true
|
||||
);
|
||||
} else {
|
||||
const folderId = filter.folder;
|
||||
return fetchFiles(folderId, filter);
|
||||
|
@ -54,7 +54,7 @@ const Dialogs = ({
|
||||
<ChangePasswordDialog
|
||||
visible={changePasswordVisible}
|
||||
onClose={() => setChangePasswordVisible(false)}
|
||||
email={profile.email}
|
||||
email={data.email}
|
||||
/>
|
||||
)}
|
||||
{changeOwner && (
|
||||
|
@ -249,6 +249,7 @@ const SectionFilterContent = ({
|
||||
showFilterLoader,
|
||||
isPublicRoom,
|
||||
publicRoomKey,
|
||||
setRoomsFilter,
|
||||
}) => {
|
||||
const location = useLocation();
|
||||
const navigate = useNavigate();
|
||||
@ -350,7 +351,6 @@ const SectionFilterContent = ({
|
||||
newFilter.searchArea === RoomSearchArea.Active
|
||||
? "rooms/shared"
|
||||
: "rooms/archived";
|
||||
|
||||
navigate(`${path}/filter?${newFilter.toUrlParams()}`);
|
||||
} else {
|
||||
const filterType = getFilterType(data) || null;
|
||||
@ -504,7 +504,7 @@ const SectionFilterContent = ({
|
||||
newFilter.searchArea === RoomSearchArea.Active
|
||||
? "rooms/shared"
|
||||
: "rooms/archived";
|
||||
|
||||
setRoomsFilter(newFilter);
|
||||
navigate(`${path}/filter?${newFilter.toUrlParams()}`);
|
||||
} else {
|
||||
const path = location.pathname.split("/filter")[0];
|
||||
@ -2060,6 +2060,7 @@ export default inject(
|
||||
setClearSearch,
|
||||
isLoadedEmptyPage,
|
||||
filesSettingsStore,
|
||||
setRoomsFilter,
|
||||
} = filesStore;
|
||||
|
||||
const { providers } = thirdPartyStore;
|
||||
@ -2140,6 +2141,7 @@ export default inject(
|
||||
accountsFilter,
|
||||
isPublicRoom,
|
||||
publicRoomKey,
|
||||
setRoomsFilter,
|
||||
};
|
||||
}
|
||||
)(
|
||||
|
@ -28,6 +28,7 @@ const WhiteLabel = (props) => {
|
||||
isSettingPaid,
|
||||
logoText,
|
||||
logoUrls,
|
||||
setLogoText,
|
||||
restoreWhiteLabelSettings,
|
||||
getWhiteLabelLogoUrls,
|
||||
setWhiteLabelSettings,
|
||||
@ -43,10 +44,12 @@ const WhiteLabel = (props) => {
|
||||
const [logoUrlsWhiteLabel, setLogoUrlsWhiteLabel] = useState(null);
|
||||
const [isSaving, setIsSaving] = useState(false);
|
||||
|
||||
const companyNameFromSessionStorage = getFromSessionStorage("companyName");
|
||||
|
||||
useEffect(() => {
|
||||
const companyNameFromSessionStorage = getFromSessionStorage("companyName");
|
||||
|
||||
if (!companyNameFromSessionStorage) {
|
||||
if (!logoText) return;
|
||||
|
||||
setLogoTextWhiteLabel(logoText);
|
||||
saveToSessionStorage("companyName", logoText);
|
||||
} else {
|
||||
@ -181,7 +184,9 @@ const WhiteLabel = (props) => {
|
||||
setIsSaving(true);
|
||||
await setWhiteLabelSettings(data);
|
||||
await getWhiteLabelLogoUrls();
|
||||
await getWhiteLabelLogoUrlsAction(); //TODO: delete duplicate request
|
||||
await getWhiteLabelLogoUrlsAction();
|
||||
setLogoText(data.logoText);
|
||||
//TODO: delete duplicate request
|
||||
toastr.success(t("Settings:SuccessfullySaveSettingsMessage"));
|
||||
} catch (error) {
|
||||
toastr.error(error);
|
||||
@ -471,6 +476,7 @@ export default inject(({ setup, auth, common }) => {
|
||||
const { setWhiteLabelSettings } = setup;
|
||||
|
||||
const {
|
||||
setLogoText,
|
||||
whiteLabelLogoText,
|
||||
getWhiteLabelLogoText,
|
||||
whiteLabelLogoUrls,
|
||||
@ -484,6 +490,7 @@ export default inject(({ setup, auth, common }) => {
|
||||
} = auth.settingsStore;
|
||||
|
||||
return {
|
||||
setLogoText,
|
||||
theme: auth.settingsStore.theme,
|
||||
logoText: whiteLabelLogoText,
|
||||
logoUrls: whiteLabelLogoUrls,
|
||||
|
@ -115,9 +115,9 @@ export const resetSessionStorage = () => {
|
||||
if (storagePeriodSettings !== defaultStoragePeriodSettings) {
|
||||
saveToSessionStorage("storagePeriod", defaultStoragePeriodSettings);
|
||||
}
|
||||
if (companyNameFromeSessionStorage !== "ONLYOFFICE") {
|
||||
saveToSessionStorage("companyName", "ONLYOFFICE");
|
||||
}
|
||||
|
||||
sessionStorage.removeItem("companyName");
|
||||
|
||||
if (
|
||||
companySettingsFromSessionStorage !==
|
||||
defaultCompanySettingsFromSessionStorage
|
||||
|
@ -81,7 +81,7 @@ class AccountsContextOptionsStore {
|
||||
key: option,
|
||||
icon: ChangeSecurityReactSvgUrl,
|
||||
label: t("PeopleTranslations:PasswordChangeButton"),
|
||||
onClick: this.toggleChangePasswordDialog,
|
||||
onClick: () => this.toggleChangePasswordDialog(item),
|
||||
};
|
||||
case "change-owner":
|
||||
return {
|
||||
@ -313,8 +313,14 @@ class AccountsContextOptionsStore {
|
||||
setChangeEmailVisible(true);
|
||||
};
|
||||
|
||||
toggleChangePasswordDialog = () => {
|
||||
toggleChangePasswordDialog = (item) => {
|
||||
const { setDialogData } = this.peopleStore.dialogStore;
|
||||
const { setChangePasswordVisible } = this.peopleStore.targetUserStore;
|
||||
const { email } = item;
|
||||
|
||||
setDialogData({
|
||||
email,
|
||||
});
|
||||
setChangePasswordVisible(true);
|
||||
};
|
||||
|
||||
|
@ -92,12 +92,12 @@ class DialogsStore {
|
||||
this.restoreAllArchive = restoreAllArchive;
|
||||
};
|
||||
|
||||
setArchiveDialogVisible = (archiveDialogVisible) => {
|
||||
this.archiveDialogVisible = archiveDialogVisible;
|
||||
setArchiveDialogVisible = (visible) => {
|
||||
this.archiveDialogVisible = visible;
|
||||
};
|
||||
|
||||
setRestoreRoomDialogVisible = (restoreRoomDialogVisible) => {
|
||||
this.restoreRoomDialogVisible = restoreRoomDialogVisible;
|
||||
setRestoreRoomDialogVisible = (visible) => {
|
||||
this.restoreRoomDialogVisible = visible;
|
||||
};
|
||||
|
||||
setSharingPanelVisible = (sharingPanelVisible) => {
|
||||
@ -116,18 +116,36 @@ class DialogsStore {
|
||||
this.ownerPanelVisible = ownerPanelVisible;
|
||||
};
|
||||
|
||||
setMoveToPanelVisible = (moveToPanelVisible) => {
|
||||
!moveToPanelVisible && this.deselectActiveFiles();
|
||||
this.moveToPanelVisible = moveToPanelVisible;
|
||||
setMoveToPanelVisible = (visible) => {
|
||||
!visible && this.deselectActiveFiles();
|
||||
|
||||
if (
|
||||
visible &&
|
||||
!this.filesStore.hasSelection &&
|
||||
!this.filesStore.hasBufferSelection
|
||||
)
|
||||
return;
|
||||
|
||||
this.moveToPanelVisible = visible;
|
||||
};
|
||||
|
||||
setRestoreAllPanelVisible = (restoreAllPanelVisible) => {
|
||||
this.restoreAllPanelVisible = restoreAllPanelVisible;
|
||||
setRestoreAllPanelVisible = (visible) => {
|
||||
this.restoreAllPanelVisible = visible;
|
||||
};
|
||||
|
||||
setCopyPanelVisible = (copyPanelVisible) => {
|
||||
!copyPanelVisible && this.deselectActiveFiles();
|
||||
this.copyPanelVisible = copyPanelVisible;
|
||||
setCopyPanelVisible = (visible) => {
|
||||
!visible && this.deselectActiveFiles();
|
||||
|
||||
if (
|
||||
visible &&
|
||||
!this.filesStore.hasSelection &&
|
||||
!this.filesStore.hasBufferSelection
|
||||
) {
|
||||
console.log("No files selected");
|
||||
return;
|
||||
}
|
||||
|
||||
this.copyPanelVisible = visible;
|
||||
};
|
||||
|
||||
setRoomCreation = (roomCreation) => {
|
||||
|
@ -147,7 +147,11 @@ class FilesActionStore {
|
||||
if (isRoomsFolder || isArchiveFolder || isArchiveFolderRoot) {
|
||||
fetchRooms(
|
||||
updatedFolder,
|
||||
newFilter ? newFilter : roomsFilter.clone()
|
||||
newFilter ? newFilter : roomsFilter.clone(),
|
||||
undefined,
|
||||
undefined,
|
||||
undefined,
|
||||
true
|
||||
).finally(() => {
|
||||
this.dialogsStore.setIsFolderActions(false);
|
||||
return setTimeout(
|
||||
|
@ -1009,6 +1009,7 @@ class FilesStore {
|
||||
};
|
||||
|
||||
setSelection = (selection) => {
|
||||
// console.log("setSelection", selection);
|
||||
this.selection = selection;
|
||||
};
|
||||
|
||||
@ -1090,6 +1091,7 @@ class FilesStore {
|
||||
};
|
||||
|
||||
setBufferSelection = (bufferSelection) => {
|
||||
// console.log("setBufferSelection", bufferSelection);
|
||||
this.bufferSelection = bufferSelection;
|
||||
};
|
||||
|
||||
@ -1345,7 +1347,26 @@ class FilesStore {
|
||||
|
||||
if (clearFilter) {
|
||||
if (clearSelection) {
|
||||
// Find not processed
|
||||
const tempSelection = this.selection.filter(
|
||||
(f) => !this.activeFiles.find((elem) => elem.id === f.id)
|
||||
);
|
||||
const tempBuffer =
|
||||
this.bufferSelection &&
|
||||
this.activeFiles.find(
|
||||
(elem) => elem.id === this.bufferSelection.id
|
||||
) == null
|
||||
? this.bufferSelection
|
||||
: null;
|
||||
|
||||
// console.log({ tempSelection, tempBuffer });
|
||||
|
||||
// Clear all selections
|
||||
this.setSelected("close");
|
||||
|
||||
// Restore not processed
|
||||
tempSelection.length && this.setSelection(tempSelection);
|
||||
tempBuffer && this.setBufferSelection(tempBuffer);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1482,7 +1503,8 @@ class FilesStore {
|
||||
filter,
|
||||
clearFilter = true,
|
||||
withSubfolders = false,
|
||||
clearSelection = true
|
||||
clearSelection = true,
|
||||
withFilterLocalStorage = false
|
||||
) => {
|
||||
const { setSelectedNode, roomsFolderId } = this.treeFoldersStore;
|
||||
|
||||
@ -1497,7 +1519,7 @@ class FilesStore {
|
||||
`UserRoomsFilter=${this.authStore.userStore.user?.id}`
|
||||
);
|
||||
|
||||
if (filterStorageItem && !filter) {
|
||||
if ((filterStorageItem && !filter) || withFilterLocalStorage) {
|
||||
const splitFilter = filterStorageItem.split(",");
|
||||
|
||||
filterData.sortBy = splitFilter[0];
|
||||
@ -1526,7 +1548,14 @@ class FilesStore {
|
||||
if (filterData.page > lastPage) {
|
||||
filterData.page = lastPage;
|
||||
|
||||
return this.fetchRooms(folderId, filterData);
|
||||
return this.fetchRooms(
|
||||
folderId,
|
||||
filterData,
|
||||
undefined,
|
||||
undefined,
|
||||
undefined,
|
||||
true
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -3142,19 +3171,21 @@ class FilesStore {
|
||||
}
|
||||
|
||||
get selectionTitle() {
|
||||
if (this.selection.length === 0) {
|
||||
if (this.bufferSelection) {
|
||||
return this.bufferSelection.title;
|
||||
}
|
||||
return null;
|
||||
if (this.selection.length === 0 && this.bufferSelection) {
|
||||
return this.bufferSelection.title;
|
||||
}
|
||||
return this.selection.find((el) => el.title).title;
|
||||
|
||||
return this.selection.find((el) => el.title)?.title || null;
|
||||
}
|
||||
|
||||
get hasSelection() {
|
||||
return !!this.selection.length;
|
||||
}
|
||||
|
||||
get hasBufferSelection() {
|
||||
return !!this.bufferSelection;
|
||||
}
|
||||
|
||||
get isEmptyFilesList() {
|
||||
const filesList = [...this.files, ...this.folders];
|
||||
return filesList.length <= 0;
|
||||
|
@ -75,19 +75,23 @@ class VersionHistoryStore {
|
||||
setVerHistoryFileVersions = (versions) => {
|
||||
const file = this.filesStore.files.find((item) => item.id == this.fileId);
|
||||
|
||||
const currentVersionGroup = Math.max.apply(
|
||||
null,
|
||||
versions.map((ver) => ver.versionGroup)
|
||||
);
|
||||
const currentVersion = versions.reduce((prev, current) => {
|
||||
return prev.versionGroup > current.versionGroup ? prev : current;
|
||||
});
|
||||
|
||||
const currentComment =
|
||||
versions[versions.length - currentVersionGroup].comment;
|
||||
// const currentVersionGroup = Math.max.apply(
|
||||
// null,
|
||||
// versions.map((ver) => ver.versionGroup)
|
||||
// );
|
||||
|
||||
// const currentComment =
|
||||
// versions[versions.length - currentVersionGroup].comment;
|
||||
|
||||
const newFile = {
|
||||
...file,
|
||||
comment: currentComment,
|
||||
comment: currentVersion.comment,
|
||||
version: versions.length,
|
||||
versionGroup: currentVersionGroup,
|
||||
versionGroup: currentVersion.versionGroup,
|
||||
};
|
||||
|
||||
this.filesStore.setFile(newFile);
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@docspace/common",
|
||||
"version": "1.1.1",
|
||||
"version": "1.1.2",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "echo 'skip it'",
|
||||
|
@ -8,7 +8,12 @@ import {
|
||||
getSystemTheme,
|
||||
} from "../utils";
|
||||
import FirebaseHelper from "../utils/firebase";
|
||||
import { ThemeKeys, COOKIE_EXPIRATION_YEAR, LANGUAGE, TenantStatus } from "../constants";
|
||||
import {
|
||||
ThemeKeys,
|
||||
COOKIE_EXPIRATION_YEAR,
|
||||
LANGUAGE,
|
||||
TenantStatus,
|
||||
} from "../constants";
|
||||
import { version } from "../package.json";
|
||||
import SocketIOHelper from "../utils/socket";
|
||||
import { Dark, Base } from "@docspace/components/themes";
|
||||
@ -39,7 +44,8 @@ class SettingsStore {
|
||||
? window.RendererProcessVariable?.theme?.type === "dark"
|
||||
? Dark
|
||||
: Base
|
||||
: window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches
|
||||
: window.matchMedia &&
|
||||
window.matchMedia("(prefers-color-scheme: dark)").matches
|
||||
? Dark
|
||||
: Base;
|
||||
trustedDomains = [];
|
||||
@ -354,7 +360,10 @@ class SettingsStore {
|
||||
else newSettings = await api.settings.getSettings(true);
|
||||
|
||||
if (window["AscDesktopEditor"] !== undefined || this.personal) {
|
||||
const dp = combineUrl(window.DocSpaceConfig?.proxy?.url, "/products/files/");
|
||||
const dp = combineUrl(
|
||||
window.DocSpaceConfig?.proxy?.url,
|
||||
"/products/files/"
|
||||
);
|
||||
this.setDefaultPage(dp);
|
||||
}
|
||||
|
||||
@ -364,7 +373,7 @@ class SettingsStore {
|
||||
key,
|
||||
key === "defaultPage"
|
||||
? combineUrl(window.DocSpaceConfig?.proxy?.url, newSettings[key])
|
||||
: newSettings[key],
|
||||
: newSettings[key]
|
||||
);
|
||||
if (key === "culture") {
|
||||
if (newSettings.wizardToken) return;
|
||||
@ -424,7 +433,7 @@ class SettingsStore {
|
||||
this.getPortalSettings(),
|
||||
this.getAppearanceTheme(),
|
||||
this.getWhiteLabelLogoUrls(),
|
||||
this.getBuildVersionInfo(),
|
||||
this.getBuildVersionInfo()
|
||||
);
|
||||
|
||||
await Promise.all(requests);
|
||||
@ -460,12 +469,12 @@ class SettingsStore {
|
||||
setAdditionalResources = async (
|
||||
feedbackAndSupportEnabled,
|
||||
videoGuidesEnabled,
|
||||
helpCenterEnabled,
|
||||
helpCenterEnabled
|
||||
) => {
|
||||
return await api.settings.setAdditionalResources(
|
||||
feedbackAndSupportEnabled,
|
||||
videoGuidesEnabled,
|
||||
helpCenterEnabled,
|
||||
helpCenterEnabled
|
||||
);
|
||||
};
|
||||
|
||||
@ -512,7 +521,13 @@ class SettingsStore {
|
||||
};
|
||||
|
||||
setCompanyInfoSettings = async (address, companyName, email, phone, site) => {
|
||||
return api.settings.setCompanyInfoSettings(address, companyName, email, phone, site);
|
||||
return api.settings.setCompanyInfoSettings(
|
||||
address,
|
||||
companyName,
|
||||
email,
|
||||
phone,
|
||||
site
|
||||
);
|
||||
};
|
||||
|
||||
setLogoUrl = (url) => {
|
||||
@ -571,11 +586,15 @@ class SettingsStore {
|
||||
};
|
||||
|
||||
getLoginLink = (token, code) => {
|
||||
return combineUrl(window.DocSpaceConfig?.proxy?.url, `/login.ashx?p=${token}&code=${code}`);
|
||||
return combineUrl(
|
||||
window.DocSpaceConfig?.proxy?.url,
|
||||
`/login.ashx?p=${token}&code=${code}`
|
||||
);
|
||||
};
|
||||
|
||||
setModuleInfo = (homepage, productId) => {
|
||||
if (this.homepage === homepage || this.currentProductId === productId) return;
|
||||
if (this.homepage === homepage || this.currentProductId === productId)
|
||||
return;
|
||||
|
||||
console.log(`setModuleInfo('${homepage}', '${productId}')`);
|
||||
|
||||
@ -621,12 +640,17 @@ class SettingsStore {
|
||||
this.setPasswordSettings(settings);
|
||||
};
|
||||
|
||||
setPortalPasswordSettings = async (minLength, upperCase, digits, specSymbols) => {
|
||||
setPortalPasswordSettings = async (
|
||||
minLength,
|
||||
upperCase,
|
||||
digits,
|
||||
specSymbols
|
||||
) => {
|
||||
const settings = await api.settings.setPortalPasswordSettings(
|
||||
minLength,
|
||||
upperCase,
|
||||
digits,
|
||||
specSymbols,
|
||||
specSymbols
|
||||
);
|
||||
this.setPasswordSettings(settings);
|
||||
};
|
||||
@ -684,7 +708,7 @@ class SettingsStore {
|
||||
|
||||
get socketHelper() {
|
||||
const socketUrl =
|
||||
this.isPublicRoom && this.publicRoomKey ? this.socketUrl : null;
|
||||
this.isPublicRoom && !this.publicRoomKey ? null : this.socketUrl;
|
||||
|
||||
return new SocketIOHelper(socketUrl, this.publicRoomKey);
|
||||
}
|
||||
@ -704,7 +728,8 @@ class SettingsStore {
|
||||
...versionInfo,
|
||||
};
|
||||
|
||||
if (!this.buildVersionInfo.documentServer) this.buildVersionInfo.documentServer = "6.4.1";
|
||||
if (!this.buildVersionInfo.documentServer)
|
||||
this.buildVersionInfo.documentServer = "6.4.1";
|
||||
};
|
||||
|
||||
setTheme = (key) => {
|
||||
|
@ -15,15 +15,20 @@ class SocketIOHelper {
|
||||
|
||||
const origin = window.location.origin;
|
||||
|
||||
client = io(origin, {
|
||||
const config = {
|
||||
withCredentials: true,
|
||||
transports: ["websocket", "polling"],
|
||||
eio: 4,
|
||||
path: url,
|
||||
query: {
|
||||
};
|
||||
|
||||
if (publicRoomKey) {
|
||||
config.query = {
|
||||
share: publicRoomKey,
|
||||
},
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
client = io(origin, config);
|
||||
|
||||
client.on("connect", () => {
|
||||
console.log("socket is connected");
|
||||
|
@ -12,7 +12,7 @@ const LoginContainer = styled.div`
|
||||
z-index: 0;
|
||||
|
||||
.remember-wrapper {
|
||||
max-width: 142px;
|
||||
max-width: 170px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@docspace/components",
|
||||
"version": "1.1.1",
|
||||
"version": "1.1.2",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "echo 'skip it'",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@docspace/editor",
|
||||
"version": "1.1.1",
|
||||
"version": "1.1.2",
|
||||
"private": true,
|
||||
"homepage": "/doceditor",
|
||||
"scripts": {
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@docspace/login",
|
||||
"version": "1.1.1",
|
||||
"version": "1.1.2",
|
||||
"private": true,
|
||||
"homepage": "/login",
|
||||
"scripts": {
|
||||
|
@ -4,8 +4,9 @@
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<OutputType>Library</OutputType>
|
||||
<NoWarn>NU1701</NoWarn>
|
||||
<NoWarn>NU1701;1591</NoWarn>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<GenerateDocumentationFile>True</GenerateDocumentationFile>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<None Remove="proto\box_cache_item.proto" />
|
||||
|
@ -26,10 +26,17 @@
|
||||
|
||||
namespace ASC.Files.Core.ApiModels;
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
public class FileShareParams
|
||||
{
|
||||
/// <summary>ID of the user with whom we want to share a file</summary>
|
||||
public Guid ShareTo { get; set; }
|
||||
public string Email { get; set; }
|
||||
|
||||
/// <summary>User email address</summary>
|
||||
public string Email { get; set; }
|
||||
|
||||
/// <summary>Sharing rights</summary>
|
||||
public FileShare Access { get; set; }
|
||||
}
|
||||
|
||||
|
@ -26,7 +26,11 @@
|
||||
|
||||
namespace ASC.Files.Core.ApiModels.RequestDto;
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
public class AcceptInvitationDto
|
||||
{
|
||||
/// <summary>Link key</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string Key { get; set; }
|
||||
}
|
@ -26,7 +26,11 @@
|
||||
|
||||
namespace ASC.Files.Core.ApiModels.RequestDto;
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
public class ArchiveRoomRequestDto
|
||||
{
|
||||
/// <summary>Specifies whether to archive a room after the editing session is finished or not</summary>
|
||||
/// <type>System.Boolean, System</type>
|
||||
public bool DeleteAfter { get; set; }
|
||||
}
|
@ -25,8 +25,15 @@
|
||||
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
|
||||
namespace ASC.Files.Core.ApiModels.RequestDto;
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
public class AutoCleanupRequestDto
|
||||
{
|
||||
/// <summary>Enables the auto-clearing or not</summary>
|
||||
/// <type>System.Boolean, System</type>
|
||||
public bool Set { get; set; }
|
||||
|
||||
/// <summary>A time interval when the auto-clearing will be performed</summary>
|
||||
/// <type>ASC.Files.Core.DateToAutoCleanUp, ASC.Files.Core</type>
|
||||
public DateToAutoCleanUp Gap { get; set; }
|
||||
}
|
||||
|
@ -26,9 +26,16 @@
|
||||
|
||||
namespace ASC.Files.Core.ApiModels.RequestDto;
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
public class BaseBatchRequestDto
|
||||
{
|
||||
/// <summary>List of folder IDs</summary>
|
||||
/// <type>System.Collections.Generic.IEnumerable{System.Text.Json.JsonElement}, System.Collections.Generic</type>
|
||||
public IEnumerable<JsonElement> FolderIds { get; set; }
|
||||
|
||||
/// <summary>List of file IDs</summary>
|
||||
/// <type>System.Collections.Generic.IEnumerable{System.Text.Json.JsonElement}, System.Collections.Generic</type>
|
||||
public IEnumerable<JsonElement> FileIds { get; set; }
|
||||
|
||||
public BaseBatchRequestDto()
|
||||
@ -38,8 +45,12 @@ public class BaseBatchRequestDto
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
public class DownloadRequestDto : BaseBatchRequestDto
|
||||
{
|
||||
/// <summary>List of file IDs which will be converted</summary>
|
||||
/// <type>System.Collections.Generic.IEnumerable{ASC.Api.Collections.ItemKeyValuePair{System.Text.Json.JsonElement, System.String}}, System.Collections.Generic</type>
|
||||
public IEnumerable<ItemKeyValuePair<JsonElement, string>> FileConvertIds { get; set; }
|
||||
|
||||
public DownloadRequestDto() : base()
|
||||
@ -48,21 +59,45 @@ public class DownloadRequestDto : BaseBatchRequestDto
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
public class DeleteBatchRequestDto : BaseBatchRequestDto
|
||||
{
|
||||
/// <summary>Specifies whether to delete a file after the editing session is finished or not</summary>
|
||||
/// <type>System.Boolean, System</type>
|
||||
public bool DeleteAfter { get; set; }
|
||||
|
||||
/// <summary>Specifies whether to move a file to the "Trash" folder or delete it immediately</summary>
|
||||
/// <type>System.Boolean, System</type>
|
||||
public bool Immediately { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
public class DeleteRequestDto
|
||||
{
|
||||
/// <summary>Specifies whether to delete a file after the editing session is finished or not</summary>
|
||||
/// <type>System.Boolean, System</type>
|
||||
public bool DeleteAfter { get; set; }
|
||||
|
||||
/// <summary>Specifies whether to move a file to the "Trash" folder or delete it immediately</summary>
|
||||
/// <type>System.Boolean, System</type>
|
||||
public bool Immediately { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
public class BatchRequestDto : BaseBatchRequestDto
|
||||
{
|
||||
/// <summary>Destination folder ID</summary>
|
||||
/// <type>System.Text.Json.JsonElement, System.Text.Json</type>
|
||||
public JsonElement DestFolderId { get; set; }
|
||||
|
||||
/// <summary>Overwriting behavior</summary>
|
||||
/// <type>ASC.Web.Files.Services.WCFService.FileOperations.FileConflictResolveType, ASC.Files.Core</type>
|
||||
public FileConflictResolveType ConflictResolveType { get; set; }
|
||||
|
||||
/// <summary>Specifies whether to delete a folder after the editing session is finished or not</summary>
|
||||
/// <type>System.Boolean, System</type>
|
||||
public bool DeleteAfter { get; set; }
|
||||
}
|
||||
|
@ -26,7 +26,11 @@
|
||||
|
||||
namespace ASC.Files.Core.ApiModels.RequestDto;
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
public class BatchTagsRequestDto
|
||||
{
|
||||
/// <summary>Tag names</summary>
|
||||
/// <type>System.Collections.Generic.IEnumerable{System.String}, System.Collections.Generic</type>
|
||||
public IEnumerable<string> Names { get; set; }
|
||||
}
|
@ -26,8 +26,15 @@
|
||||
|
||||
namespace ASC.Files.Core.ApiModels.RequestDto;
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
public class ChangeHistoryRequestDto
|
||||
{
|
||||
/// <summary>File version</summary>
|
||||
/// <type>System.Int32, System</type>
|
||||
public int Version { get; set; }
|
||||
|
||||
/// <summary>Marks as a version or revision</summary>
|
||||
/// <type>System.Boolean, System</type>
|
||||
public bool ContinueVersion { get; set; }
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user