mirror of
https://github.com/bitwarden/server
synced 2025-12-16 00:03:54 +00:00
* Move to access query for project commands * Swap to hasAccess method per action * Swap to authorization handler pattern * Move ProjectOperationRequirement to Core * Add default throw + tests * Swap to reflection for testing switch
22 lines
427 B
C#
22 lines
427 B
C#
using System.ComponentModel.DataAnnotations;
|
|
using Bit.Core.SecretsManager.Entities;
|
|
using Bit.Core.Utilities;
|
|
|
|
namespace Bit.Api.SecretsManager.Models.Request;
|
|
|
|
public class ProjectUpdateRequestModel
|
|
{
|
|
[Required]
|
|
[EncryptedString]
|
|
public string Name { get; set; }
|
|
|
|
public Project ToProject(Guid id)
|
|
{
|
|
return new Project
|
|
{
|
|
Id = id,
|
|
Name = Name,
|
|
};
|
|
}
|
|
}
|