mirror of
https://github.com/bitwarden/server.git
synced 2025-06-30 07:36:14 -05:00
[EC-343] Gate custom permissions behind enterprise plan (#2352)
* [EC-343] Added column 'UseCustomPermissions' to Organization table
* [EC-343] Added 'UseCustomPermissions' to Api responses
* [EC-343] Added 'UseCustomPermissions' to Admin view
* [EC-343] Add constraint to Organization table to have default UseCustomPermissions value
* [EC-343] Recreate OrganizationView to include UseCustomPermissions column
* [EC-343] Add MySql EF migrations
* [EC-343] Add Postgres EF migrations
* Revert "[EC-343] Add Postgres EF migrations"
This reverts commit 8f1654cb7d
.
* [EC-343] Add Postgres migrations and script
* [EC-343] dotnet format
* [EC-343] Set 'Custom Permissions' feature as unchecked for teams plan
* [EC-343] Add CustomPermissions to plan upgrades
* [EC-343] Update CURRENT_LICENSE_FILE_VERSION
* [EC-343] Enable 'Custom Permissions' on Enterprise 2019 plan
* [EC-343] Updated migration script to include Enterprise 2019 plan
* [EC-343] Update CURRENT_LICENSE_FILE_VERSION to 10
* [EC-343] Move logic checking if Organization can use custom permissions to OrganizationService
* [EC-343] Add unit tests to validate UseCustomPermissions check
* [EC-343] Revert UseCustomPermissionsFlag migration
* [EC-343] Fix typo in OrganizationUserOrganizationDetailsViewQuery
* [EC-343] Add Postgres migrations without affecting other datetime column
* [EC-343] Create ValidateOrganizationCustomPermissionsEnabledAsync. Add more unit tests around CustomPermissions check
* [EC-343] Add curly brackets to if condition
* [EC-343] Rename unit tests
This commit is contained in:
1675
util/MySqlMigrations/Migrations/20221020154432_UseCustomPermissionsFlag.Designer.cs
generated
Normal file
1675
util/MySqlMigrations/Migrations/20221020154432_UseCustomPermissionsFlag.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,25 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Bit.MySqlMigrations.Migrations;
|
||||
|
||||
public partial class UseCustomPermissionsFlag : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "UseCustomPermissions",
|
||||
table: "Organization",
|
||||
type: "tinyint(1)",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "UseCustomPermissions",
|
||||
table: "Organization");
|
||||
}
|
||||
}
|
@ -622,6 +622,9 @@ namespace Bit.MySqlMigrations.Migrations
|
||||
b.Property<bool>("UseApi")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<bool>("UseCustomPermissions")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<bool>("UseDirectory")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
|
@ -0,0 +1,8 @@
|
||||
START TRANSACTION;
|
||||
|
||||
ALTER TABLE `Organization` ADD `UseCustomPermissions` tinyint(1) NOT NULL DEFAULT FALSE;
|
||||
|
||||
INSERT INTO `__EFMigrationsHistory` (`MigrationId`, `ProductVersion`)
|
||||
VALUES ('20221020154432_UseCustomPermissionsFlag', '6.0.4');
|
||||
|
||||
COMMIT;
|
Reference in New Issue
Block a user