Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 1.1.{build}
version: 2.0.{build}
skip_tags: true
skip_branch_with_pr: true
test: off
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "graphql-authorization",
"version": "1.1",
"version": "2.0",
"main": "index.js",
"repository": "git@github.com:graphql-dotnet/authorization.git",
"author": "Joe McBride <joe@uicraftsman.com>",
Expand Down
5 changes: 4 additions & 1 deletion src/GraphQL.Authorization/AuthorizationMetadataExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ public static Task<AuthorizationResult> Authorize(
public static void AuthorizeWith(this IProvideMetadata type, string policy)
{
var list = GetPolicies(type);
list.Fill(policy);
if(!list.Contains(policy))
{
list.Add(policy);
}
type.Metadata[PolicyKey] = list;
}

Expand Down
4 changes: 2 additions & 2 deletions src/GraphQL.Authorization/GraphQL.Authorization.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<Description>A toolset for authorizing access to graph types for GraphQL .NET</Description>
<VersionPrefix>1.1</VersionPrefix>
<VersionPrefix>2.0</VersionPrefix>
<Authors>Joe McBride</Authors>
<TargetFrameworks>netstandard1.3;net46</TargetFrameworks>
<AssemblyName>GraphQL.Authorization</AssemblyName>
Expand All @@ -24,7 +24,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="GraphQL" Version="2.0.0" />
<PackageReference Include="GraphQL" Version="2.3.0" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netstandard1.3'">
Expand Down
4 changes: 2 additions & 2 deletions src/Harness/Harness.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="GraphQL" Version="2.0.0" />
<PackageReference Include="GraphQL" Version="2.3.0" />
<PackageReference Include="GraphQL.Server.Ui.GraphiQL" Version="3.1.0" />
<PackageReference Include="GraphQL.Server.Transports.AspNetCore" Version="3.1.0" />
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.5" />
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.9" />
</ItemGroup>

<ItemGroup>
Expand Down