using System; using System.Collections.Generic; using System.Linq; using System.Security.Claims; using isn.abst; using isnd.Data; using isnd.Data.Catalog; using isnd.Entities; 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; } } }