1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-04 01:22:50 -05:00

Org admin cleanup

- Added sproc to check if org admin for free org create
- Removed old proeprties not in user from org and subvault
- Added more cascade deletes
This commit is contained in:
Kyle Spearrin
2017-04-07 14:52:31 -04:00
parent 52ccef85c6
commit 7497d5ca6f
29 changed files with 47 additions and 98 deletions

View File

@ -44,14 +44,12 @@ namespace Bit.Core.Models.Api
{
[Required]
public string SubvaultId { get; set; }
public bool Admin { get; set; }
public bool ReadOnly { get; set; }
public SubvaultUser ToSubvaultUser()
{
var subvault = new SubvaultUser
{
Admin = Admin,
ReadOnly = ReadOnly,
SubvaultId = new Guid(SubvaultId)
};

View File

@ -1,9 +1,5 @@
using System;
using System.ComponentModel.DataAnnotations;
using Bit.Core.Utilities;
using Bit.Core.Models.Table;
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
@ -20,7 +16,6 @@ namespace Bit.Core.Models.Api
{
OrganizationUserId = new Guid(UserId),
SubvaultId = new Guid(s.SubvaultId),
Admin = s.Admin,
ReadOnly = s.ReadOnly
});
}
@ -28,7 +23,6 @@ namespace Bit.Core.Models.Api
public class Subvault
{
public string SubvaultId { get; set; }
public bool Admin { get; set; }
public bool ReadOnly { get; set; }
}
}
@ -36,7 +30,6 @@ namespace Bit.Core.Models.Api
public class SubvaultUserUserRequestModel
{
public string UserId { get; set; }
public bool Admin { get; set; }
public bool ReadOnly { get; set; }
}
}