mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2024-11-19 18:11:36 +01:00
a5ff655eed
This is due to the fact our UserService is a singleton, and it had a reference on UserManager which is scoped. UserManager is caching user entities at the scope level. UserService then had a view completely unsynchronized with the database.
16 lines
348 B
C#
16 lines
348 B
C#
using System.Collections.Generic;
|
|
using System;
|
|
using System.Linq;
|
|
|
|
namespace BTCPayServer
|
|
{
|
|
public class Roles
|
|
{
|
|
public const string ServerAdmin = "ServerAdmin";
|
|
public static bool HasServerAdmin(IList<string> roles)
|
|
{
|
|
return roles.Contains(Roles.ServerAdmin, StringComparer.Ordinal);
|
|
}
|
|
}
|
|
}
|