-
Notifications
You must be signed in to change notification settings - Fork 643
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4928 from NuGet/dev
[ReleasePrep][2017.10.30]RI of dev into master
- Loading branch information
Showing
89 changed files
with
2,450 additions
and
435 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
// Copyright (c) .NET Foundation. All rights reserved. | ||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. | ||
|
||
namespace NuGetGallery | ||
{ | ||
/// <summary> | ||
/// Tracks membership of a User account in an Organization account. | ||
/// </summary> | ||
public class Membership | ||
{ | ||
/// <summary> | ||
/// Organization foreign key. | ||
/// </summary> | ||
public int OrganizationKey { get; set; } | ||
|
||
/// <summary> | ||
/// The <see cref="Organization"/> that contains members. | ||
/// </summary> | ||
public virtual Organization Organization { get; set; } | ||
|
||
/// <summary> | ||
/// Member (User) foreign key. | ||
/// </summary> | ||
public int MemberKey { get; set; } | ||
|
||
/// <summary> | ||
/// The <see cref="User"/> that is a member of the <see cref="Organization"/>. | ||
/// | ||
/// Note that there is no database contraint preventing memberships of Organizations into other | ||
/// Organizations. For now this is restricted by the Gallery, but could be considered in the | ||
/// future if we want to support Organization teams. | ||
/// </summary> | ||
public virtual User Member { get; set; } | ||
|
||
/// <summary> | ||
/// Whether the <see cref="Member"/> is an administrator for the <see cref="Organization"/>. | ||
/// | ||
/// Administrators have the following capabilities that collaborators don't: | ||
/// - Organization management (e.g., settings, membership) | ||
/// - Package owner management | ||
/// - Pushing new package registrations | ||
/// </summary> | ||
public bool IsAdmin { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// Copyright (c) .NET Foundation. All rights reserved. | ||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. | ||
|
||
using System.Collections.Generic; | ||
|
||
namespace NuGetGallery | ||
{ | ||
/// <summary> | ||
/// Organization <see cref="NuGetGallery.User" /> account, based on TPT hierarchy. | ||
/// | ||
/// With the addition of organizations, the users table effectively becomes an account table. Organizations accounts | ||
/// are child types created using TPT inheritance. User accounts are not child types, but this could be done in the | ||
/// future if we want to add constraints for user accounts or user-only settings. | ||
/// </summary> | ||
/// <see href="https://weblogs.asp.net/manavi/inheritance-mapping-strategies-with-entity-framework-code-first-ctp5-part-2-table-per-type-tpt" /> | ||
public class Organization : User | ||
{ | ||
public Organization() : base() | ||
{ | ||
} | ||
|
||
public Organization(string name) : base(name) | ||
{ | ||
} | ||
|
||
/// <summary> | ||
/// Organization Memberships to this organization. | ||
/// </summary> | ||
public virtual ICollection<Membership> Members { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.