Files: refactor
This commit is contained in:
parent
f1d98ce6fd
commit
ca2c9e8b57
@ -2627,7 +2627,7 @@ public class FileStorageService<T> //: IFileStorageService
|
||||
{
|
||||
Access = share,
|
||||
Id = linkId,
|
||||
SubjectType = SubjectType.InvintationLink,
|
||||
SubjectType = SubjectType.InvitationLink,
|
||||
FileShareOptions = new FileShareOptions
|
||||
{
|
||||
Title = title,
|
||||
|
@ -37,7 +37,7 @@ public class FileShareRecord : IMapFrom<DbFilesSecurity>
|
||||
public FileShare Share { get; set; }
|
||||
public FileShareOptions FileShareOptions { get; set; }
|
||||
public int Level { get; set; }
|
||||
public bool IsLink => SubjectType == SubjectType.InvintationLink || SubjectType == SubjectType.ExternalLink;
|
||||
public bool IsLink => SubjectType == SubjectType.InvitationLink || SubjectType == SubjectType.ExternalLink;
|
||||
|
||||
public void Mapping(AutoMapper.Profile profile)
|
||||
{
|
||||
@ -75,4 +75,4 @@ public class SmallShareRecord
|
||||
public DateTime TimeStamp { get; set; }
|
||||
public FileShare Share { get; set; }
|
||||
public SubjectType SubjectType { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -31,5 +31,5 @@ public enum SubjectType
|
||||
UserOrGroup = 0,
|
||||
ExternalLink = 1,
|
||||
Restriction = 2,
|
||||
InvintationLink = 3,
|
||||
InvitationLink = 3,
|
||||
}
|
@ -110,7 +110,7 @@ public class RoomLinkService
|
||||
{
|
||||
var securityDao = _daoFactory.GetSecurityDao<int>();
|
||||
var share = await securityDao.GetSharesAsync(new[] { key })
|
||||
.Where(s => s.SubjectType == SubjectType.InvintationLink)
|
||||
.Where(s => s.SubjectType == SubjectType.InvitationLink)
|
||||
.FirstOrDefaultAsync();
|
||||
|
||||
return share;
|
||||
|
Loading…
Reference in New Issue
Block a user