Skip to content

Commit

Permalink
Do not force user login for package search operation (DynamoDS#13725)
Browse files Browse the repository at this point in the history
* restrict user login for pkg search

* check login state
  • Loading branch information
zeusongit committed Feb 6, 2023
1 parent 35005c3 commit 5f6e4ef
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Collections.Specialized;
Expand Down Expand Up @@ -740,6 +740,9 @@ public void RefreshAndSearchAsync()

internal void RefreshInfectedPackages()
{
//do not call a protected route, if user is not logged in already.
if (PackageManagerClientViewModel.LoginState != Greg.AuthProviders.LoginState.LoggedIn) return;

var infectedPkgs = PackageManagerClientViewModel.GetInfectedPackages();
infectedPkgs.Sort((e1, e2) => e1.InfectedPackageCreationDate.CompareTo(e2.InfectedPackageCreationDate));

Expand Down

0 comments on commit 5f6e4ef

Please sign in to comment.