mirror of
https://github.com/bitwarden/server.git
synced 2025-07-12 21:27:35 -05:00
Implemented Custom role and permissions (#1057)
* Implemented Custom role and permissions * Converted permissions columns to a json blob * Code review fixes for Permissions * sql build fix * Update Permissions.cs * formatting * Update IOrganizationService.cs * reworked a conditional * built out tests for relevant organization service methods * removed unused usings * fixed a broken test and a bad empty string init * removed 'Attribute' from some attribute instances
This commit is contained in:
27
src/Core/Models/Business/OrganizationUserInvite.cs
Normal file
27
src/Core/Models/Business/OrganizationUserInvite.cs
Normal file
@ -0,0 +1,27 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Bit.Core.Models.Api;
|
||||
using Bit.Core.Models.Data;
|
||||
|
||||
namespace Bit.Core.Models.Business
|
||||
{
|
||||
public class OrganizationUserInvite
|
||||
{
|
||||
public IEnumerable<string> Emails { get; set; }
|
||||
public Enums.OrganizationUserType? Type { get; set; }
|
||||
public bool AccessAll { get; set; }
|
||||
public Permissions Permissions { get; set; }
|
||||
public IEnumerable<SelectionReadOnly> Collections { get; set; }
|
||||
|
||||
public OrganizationUserInvite() {}
|
||||
|
||||
public OrganizationUserInvite(OrganizationUserInviteRequestModel requestModel)
|
||||
{
|
||||
Emails = requestModel.Emails;
|
||||
Type = requestModel.Type.Value;
|
||||
AccessAll = requestModel.AccessAll;
|
||||
Collections = requestModel.Collections.Select(c => c.ToSelectionReadOnly());
|
||||
Permissions = requestModel.Permissions;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user