REORG+histo
This commit is contained in:
parent
459f8ea422
commit
6dd76ac1a5
28 changed files with 948 additions and 159 deletions
15
src/isnd/Helpers/PackageVersionHelpers.cs
Normal file
15
src/isnd/Helpers/PackageVersionHelpers.cs
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
using System.Security.Claims;
|
||||
using isnd.Data;
|
||||
|
||||
namespace isnd.Helpers
|
||||
{
|
||||
public static class PackageVersionHelpers
|
||||
{
|
||||
|
||||
public static bool IsOwner(this ClaimsPrincipal user, PackageVersion v)
|
||||
{
|
||||
var userId = user.FindFirstValue(ClaimTypes.NameIdentifier);
|
||||
return v.Package.OwnerId == userId;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue