mirror of
https://github.com/bitwarden/server
synced 2025-12-17 00:33:23 +00:00
SelectionReadOnly MERGE to CollectionGroup
This commit is contained in:
33
src/Core/Models/Api/Request/SelectionReadOnlyRequestModel.cs
Normal file
33
src/Core/Models/Api/Request/SelectionReadOnlyRequestModel.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Newtonsoft.Json;
|
||||
using Bit.Core.Models.Table;
|
||||
using Bit.Core.Models.Data;
|
||||
|
||||
namespace Bit.Core.Models.Api
|
||||
{
|
||||
public class SelectionReadOnlyRequestModel
|
||||
{
|
||||
[Required]
|
||||
public string Id { get; set; }
|
||||
public bool ReadOnly { get; set; }
|
||||
|
||||
public CollectionUser ToCollectionUser()
|
||||
{
|
||||
return new CollectionUser
|
||||
{
|
||||
ReadOnly = ReadOnly,
|
||||
CollectionId = new Guid(Id)
|
||||
};
|
||||
}
|
||||
|
||||
public SelectionReadOnly ToSelectionReadOnly()
|
||||
{
|
||||
return new SelectionReadOnly
|
||||
{
|
||||
Id = new Guid(Id),
|
||||
ReadOnly = ReadOnly
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user