Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package remained verified after the organization owning the namespace was removed as owner of the package #6039

Closed
cristinamanum opened this issue Jun 8, 2018 · 4 comments

Comments

@cristinamanum
Copy link
Contributor

See PR: #5984

The package is still verified after the organization owning the namespace was removed as the owner of the package.
Observation: Everything in database seems to be cleaned.

  1. The package has only one owner that is not the org or the org admin.
  2. The namespace "cmaad" is reserved by the cmanutestorg
  3. The ReservedNamespaceRegistrations does not have a reference to the package that is verified.

Few UI snapshots:
image

image

image

@shishirx34
Copy link
Contributor

Looks like the IsVerified flag isn't cleared from the PackageRegistrations table after removing organization that owns it. @scottbommarito worked on it recently to manage and cleanup registrations for namespace for org owner removal.

@shishirx34
Copy link
Contributor

There is a check for removing the verified flag:

if (packageRegistration.IsVerified && !packageRegistration.ReservedNamespaces.Any())
are you sure that the package registration doesn't have any other matching/related namespace?

@shishirx34
Copy link
Contributor

Oh, I think I see the problem, the issue is on the same line mentioned above, however, the previous call to RemovePackageRegistrationFromNamespace() to remove the relevant PackageRegistration from ReservedNamespace is not committed, and its likely the !packageRegistration.ReservedNamespaces.Any() is returning false, thereby not removing the IsVerified flag, I will let @scottbommarito fix the issue, since it is likely this has far reaching effects due to the above said refactoring.

@scottbommarito
Copy link
Contributor

Currently RemovePackageRegistrationFromNamespace removes the PackageRegistration from the ReservedNamespace but does not remove the ReservedNamespace from the PackageRegistration. It needs to do both for the check you mentioned above to work.

The unit tests do not need to change because they already assume RemovePackageRegistrationFromNamespace does both.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants