DocSpace-buildtools/common/ASC.Core.Common/Core/IUserService.cs

95 lines
3.4 KiB
C#
Raw Normal View History

2019-05-15 14:56:09 +00:00
/*
*
* (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;
2019-08-15 12:04:42 +00:00
using System.Collections.Generic;
2019-11-25 09:49:12 +00:00
using System.Linq;
2020-02-25 08:02:13 +00:00
using System.Linq.Expressions;
2020-10-18 16:03:14 +00:00
using ASC.Common;
using ASC.Core.Caching;
2020-02-25 08:02:13 +00:00
using ASC.Core.Common.EF;
2020-10-18 16:03:14 +00:00
using ASC.Core.Data;
2019-05-15 14:56:09 +00:00
using ASC.Core.Users;
namespace ASC.Core
2020-10-18 16:03:14 +00:00
{
[Scope(typeof(ConfigureEFUserService), typeof(ConfigureCachedUserService))]
2019-05-15 14:56:09 +00:00
public interface IUserService
{
IDictionary<Guid, UserInfo> GetUsers(int tenant, DateTime from);
2019-11-25 09:49:12 +00:00
IQueryable<UserInfo> GetUsers(int tenant, bool isAdmin,
EmployeeStatus? employeeStatus,
2019-08-08 14:42:29 +00:00
List<List<Guid>> includeGroups,
List<Guid> excludeGroups,
EmployeeActivationStatus? activationStatus,
string text,
string sortBy,
bool sortOrderAsc,
long limit,
long offset,
2019-11-25 09:49:12 +00:00
out int total,
out int count);
2019-05-15 14:56:09 +00:00
2020-02-25 08:02:13 +00:00
UserInfo GetUser(int tenant, Guid id);
2020-12-28 13:22:08 +00:00
UserInfo GetUser(int tenant, string email);
2020-02-25 08:02:13 +00:00
UserInfo GetUser(int tenant, Guid id, Expression<Func<User, UserInfo>> exp);
2019-05-15 14:56:09 +00:00
UserInfo GetUserByPasswordHash(int tenant, string login, string passwordHash);
2019-05-15 14:56:09 +00:00
UserInfo SaveUser(int tenant, UserInfo user);
void RemoveUser(int tenant, Guid id);
byte[] GetUserPhoto(int tenant, Guid id);
void SetUserPhoto(int tenant, Guid id, byte[] photo);
DateTime GetUserPasswordStamp(int tenant, Guid id);
void SetUserPasswordHash(int tenant, Guid id, string passwordHash);
2019-05-15 14:56:09 +00:00
IDictionary<Guid, Group> GetGroups(int tenant, DateTime from);
Group GetGroup(int tenant, Guid id);
Group SaveGroup(int tenant, Group group);
void RemoveGroup(int tenant, Guid id);
IDictionary<string, UserGroupRef> GetUserGroupRefs(int tenant, DateTime from);
UserGroupRef SaveUserGroupRef(int tenant, UserGroupRef r);
void RemoveUserGroupRef(int tenant, Guid userId, Guid groupId, UserGroupRefType refType);
}
}