DocSpace-client/web/ASC.Web.Api/Models/AuthServiceModel.cs

40 lines
1.0 KiB
C#
Raw Normal View History

2020-08-26 14:34:21 +00:00
using System.Collections.Generic;
2020-08-26 16:13:41 +00:00
using ASC.Core.Common.Configuration;
2020-08-26 14:34:21 +00:00
using ASC.Web.Studio.UserControls.Management;
namespace ASC.Web.Api.Models
{
public class AuthServiceModel
{
public string Name { get; set; }
2020-08-26 16:13:41 +00:00
public string Title { get; set; }
2020-09-03 08:43:13 +00:00
public string Description { get; set; }
2020-08-26 16:13:41 +00:00
public string Instruction { get; set; }
public bool CanSet { get; set; }
2020-08-26 14:34:21 +00:00
public List<AuthKey> Props { get; set; }
2020-08-26 16:13:41 +00:00
public AuthServiceModel()
{
}
public AuthServiceModel(Consumer consumer)
{
var authService = new AuthService(consumer);
Name = authService.Name;
Title = authService.Title;
2020-09-03 08:43:13 +00:00
Description = authService.Description;
2020-08-26 16:13:41 +00:00
Instruction = authService.Instruction;
CanSet = authService.CanSet;
if (consumer.CanSet)
{
Props = authService.Props;
CanSet = authService.CanSet;
}
}
2020-08-26 14:34:21 +00:00
}
}