Api: added some methods
This commit is contained in:
parent
e84c8864db
commit
0ffdc833b8
File diff suppressed because it is too large
Load Diff
@ -31,7 +31,6 @@ using System.Runtime.Serialization;
|
||||
using ASC.Api.Core;
|
||||
using ASC.Core;
|
||||
using ASC.Core.Users;
|
||||
using ASC.Web.Core;
|
||||
using ASC.Web.Core.Users;
|
||||
|
||||
namespace ASC.Web.Api.Models
|
||||
|
@ -23,4 +23,10 @@ namespace ASC.People.Models
|
||||
public string Files { get; set; }
|
||||
public string Password { get; set; }
|
||||
}
|
||||
|
||||
public class UpdateMemberModel : MemberModel
|
||||
{
|
||||
public string UserId { get; set; }
|
||||
public bool? Disable { get; set; }
|
||||
}
|
||||
}
|
||||
|
82
products/ASC.People/Models/ThumbnailsDataWrapper.cs
Normal file
82
products/ASC.People/Models/ThumbnailsDataWrapper.cs
Normal file
@ -0,0 +1,82 @@
|
||||
/*
|
||||
*
|
||||
* (c) Copyright Ascensio System Limited 2010-2018
|
||||
*
|
||||
* This program is freeware. You can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License (GPL) version 3 as published by the Free Software Foundation (https://www.gnu.org/copyleft/gpl.html).
|
||||
* In accordance with Section 7(a) of the GNU GPL its Section 15 shall be amended to the effect that
|
||||
* Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights.
|
||||
*
|
||||
* THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. For more details, see GNU GPL at https://www.gnu.org/copyleft/gpl.html
|
||||
*
|
||||
* You can contact Ascensio System SIA by email at sales@onlyoffice.com
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions of ONLYOFFICE must display
|
||||
* Appropriate Legal Notices, as required under Section 5 of the GNU GPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7 § 3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains
|
||||
* relevant author attributions when distributing the software. If the display of the logo in its graphic
|
||||
* form is not reasonably feasible for technical reasons, you must include the words "Powered by ONLYOFFICE"
|
||||
* in every copy of the program you distribute.
|
||||
* Pursuant to Section 7 § 3(e) we decline to grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
using System;
|
||||
using System.Runtime.Serialization;
|
||||
using ASC.Web.Core.Users;
|
||||
|
||||
namespace ASC.Web.Api.Models
|
||||
{
|
||||
[DataContract]
|
||||
public class ThumbnailsDataWrapper
|
||||
{
|
||||
public ThumbnailsDataWrapper(Guid userId)
|
||||
{
|
||||
Original = UserPhotoManager.GetPhotoAbsoluteWebPath(userId);
|
||||
Retina = UserPhotoManager.GetRetinaPhotoURL(userId);
|
||||
Max = UserPhotoManager.GetMaxPhotoURL(userId);
|
||||
Big = UserPhotoManager.GetBigPhotoURL(userId);
|
||||
Medium = UserPhotoManager.GetMediumPhotoURL(userId);
|
||||
Small = UserPhotoManager.GetSmallPhotoURL(userId);
|
||||
}
|
||||
|
||||
private ThumbnailsDataWrapper()
|
||||
{
|
||||
}
|
||||
|
||||
[DataMember]
|
||||
public string Original { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public string Retina { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public string Max { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public string Big { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public string Medium { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public string Small { get; set; }
|
||||
|
||||
|
||||
public static ThumbnailsDataWrapper GetSample()
|
||||
{
|
||||
return new ThumbnailsDataWrapper
|
||||
{
|
||||
Original = "default_user_photo_size_1280-1280.png",
|
||||
Retina = "default_user_photo_size_360-360.png",
|
||||
Max = "default_user_photo_size_200-200.png",
|
||||
Big = "default_user_photo_size_82-82.png",
|
||||
Medium = "default_user_photo_size_48-48.png",
|
||||
Small = "default_user_photo_size_32-32.png",
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
11
products/ASC.People/Models/ThumbnailsModel.cs
Normal file
11
products/ASC.People/Models/ThumbnailsModel.cs
Normal file
@ -0,0 +1,11 @@
|
||||
namespace ASC.People.Models
|
||||
{
|
||||
public class ThumbnailsModel
|
||||
{
|
||||
public string TmpFile { get; set; }
|
||||
public int X { get; set; }
|
||||
public int Y { get; set; }
|
||||
public int Width { get; set; }
|
||||
public int Height { get; set; }
|
||||
}
|
||||
}
|
10
products/ASC.People/Models/UpdateMembersModel.cs
Normal file
10
products/ASC.People/Models/UpdateMembersModel.cs
Normal file
@ -0,0 +1,10 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace ASC.People.Models
|
||||
{
|
||||
public class UpdateMembersModel
|
||||
{
|
||||
public IEnumerable<Guid> UserIds { get; set; }
|
||||
}
|
||||
}
|
@ -15,8 +15,7 @@ namespace ASC.Web.Api.Controllers
|
||||
[AllowAnonymous]
|
||||
public class AuthenticationController : ControllerBase
|
||||
{
|
||||
[Read, Read(false)]
|
||||
[HttpPost]
|
||||
[Create, Create(false)]
|
||||
public AuthenticationTokenData AuthenticateMe([FromBody]AuthModel auth)
|
||||
{
|
||||
var user = GetUser(auth.UserName, auth.Password);
|
||||
|
@ -111,7 +111,7 @@
|
||||
<LastGenOutput>FeedResource.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Update="PublicResources\Resource.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resource.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Update="PublicResources\ResourceJS.resx">
|
||||
|
2762
web/ASC.Web.Core/PublicResources/Resource.Designer.cs
generated
2762
web/ASC.Web.Core/PublicResources/Resource.Designer.cs
generated
File diff suppressed because it is too large
Load Diff
@ -29,7 +29,6 @@ using System.Globalization;
|
||||
using System.Net.Mail;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Web;
|
||||
using ASC.Common;
|
||||
using ASC.Core;
|
||||
using ASC.Core.Tenants;
|
||||
|
Loading…
Reference in New Issue
Block a user