mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-21 05:43:19 -07:00
User perms
This commit is contained in:
parent
624b32d926
commit
6d1eef9154
17 changed files with 524 additions and 104 deletions
|
@ -7,8 +7,9 @@ CREATE TABLE IF NOT EXISTS Users
|
|||
UserName varchar(50) NOT NULL,
|
||||
Salt BLOB NOT NULL,
|
||||
Hash BLOB NOT NULL,
|
||||
Claims BLOB NOT NULL,
|
||||
UserProperties BLOB
|
||||
UserProperties BLOB,
|
||||
Permissions INTEGER,
|
||||
Features INTEGER
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS UserLogins
|
||||
|
|
|
@ -57,12 +57,13 @@ namespace PlexRequests.Store
|
|||
}
|
||||
}
|
||||
|
||||
public static void AddColumn(this IDbConnection connection, string tableName, string alterType, string newColumn, bool allowNulls, string dataType)
|
||||
public static void AlterTable(this IDbConnection connection, string tableName, string alterType, string newColumn, bool allowNulls, string dataType)
|
||||
{
|
||||
connection.Open();
|
||||
var result = connection.Query<TableInfo>($"PRAGMA table_info({tableName});");
|
||||
if (result.Any(x => x.name == newColumn))
|
||||
{
|
||||
connection.Close();
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -35,7 +35,10 @@ namespace PlexRequests.Store
|
|||
{
|
||||
public byte[] Hash { get; set; }
|
||||
public byte[] Salt { get; set; }
|
||||
[Obsolete]
|
||||
public byte[] Claims { get; set; }
|
||||
public byte[] UserProperties { get; set; }
|
||||
public int Permissions { get; set; }
|
||||
public int Features { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue