mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-14 02:26:55 -07:00
#2363 Added the ability to pass any username into the API using the ApiAlias header
This commit is contained in:
parent
359d191fc3
commit
3b91392323
18 changed files with 1455 additions and 116 deletions
|
@ -34,7 +34,7 @@ namespace Ombi.Store.Entities
|
|||
public bool IsEmbyConnect => UserType == UserType.EmbyUser && EmbyConnectUserId.HasValue();
|
||||
|
||||
[NotMapped]
|
||||
public string UserAlias => string.IsNullOrEmpty(Alias) ? UserName : Alias;
|
||||
public virtual string UserAlias => string.IsNullOrEmpty(Alias) ? UserName : Alias;
|
||||
|
||||
[NotMapped]
|
||||
public bool EmailLogin { get; set; }
|
||||
|
|
|
@ -17,6 +17,7 @@ namespace Ombi.Store.Entities.Requests
|
|||
public DateTime MarkedAsDenied { get; set; }
|
||||
public string DeniedReason { get; set; }
|
||||
public RequestType RequestType { get; set; }
|
||||
public string RequestedByAlias { get; set; }
|
||||
|
||||
[ForeignKey(nameof(RequestedUserId))]
|
||||
public OmbiUser RequestedUser { get; set; }
|
||||
|
|
1212
src/Ombi.Store/Migrations/20190116212601_RequestedByAlias.Designer.cs
generated
Normal file
1212
src/Ombi.Store/Migrations/20190116212601_RequestedByAlias.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
40
src/Ombi.Store/Migrations/20190116212601_RequestedByAlias.cs
Normal file
40
src/Ombi.Store/Migrations/20190116212601_RequestedByAlias.cs
Normal file
|
@ -0,0 +1,40 @@
|
|||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace Ombi.Store.Migrations
|
||||
{
|
||||
public partial class RequestedByAlias : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "RequestedByAlias",
|
||||
table: "MovieRequests",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "RequestedByAlias",
|
||||
table: "ChildRequests",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "RequestedByAlias",
|
||||
table: "AlbumRequests",
|
||||
nullable: true);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "RequestedByAlias",
|
||||
table: "MovieRequests");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "RequestedByAlias",
|
||||
table: "ChildRequests");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "RequestedByAlias",
|
||||
table: "AlbumRequests");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -14,7 +14,7 @@ namespace Ombi.Store.Migrations
|
|||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "2.2.0-rtm-35687");
|
||||
.HasAnnotation("ProductVersion", "2.2.1-servicing-10028");
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
|
||||
{
|
||||
|
@ -583,6 +583,8 @@ namespace Ombi.Store.Migrations
|
|||
|
||||
b.Property<int>("RequestType");
|
||||
|
||||
b.Property<string>("RequestedByAlias");
|
||||
|
||||
b.Property<DateTime>("RequestedDate");
|
||||
|
||||
b.Property<string>("RequestedUserId");
|
||||
|
@ -621,6 +623,8 @@ namespace Ombi.Store.Migrations
|
|||
|
||||
b.Property<int>("RequestType");
|
||||
|
||||
b.Property<string>("RequestedByAlias");
|
||||
|
||||
b.Property<DateTime>("RequestedDate");
|
||||
|
||||
b.Property<string>("RequestedUserId");
|
||||
|
@ -749,6 +753,8 @@ namespace Ombi.Store.Migrations
|
|||
|
||||
b.Property<int>("RequestType");
|
||||
|
||||
b.Property<string>("RequestedByAlias");
|
||||
|
||||
b.Property<DateTime>("RequestedDate");
|
||||
|
||||
b.Property<string>("RequestedUserId");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue