-
Notifications
You must be signed in to change notification settings - Fork 641
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
Restore auto-add co-owner feature #6289
Conversation
@joelverhagen @skofman1 this is the commit you may want to zoom into: 8ff0fcb |
8ff0fcb
to
adc7719
Compare
@@ -395,6 +395,9 @@ protected override void Load(ContainerBuilder builder) | |||
|
|||
RegisterCookieComplianceService(builder, configuration, diagnosticsService); | |||
|
|||
builder.RegisterType<MicrosoftTeamSubscription>() | |||
.SingleInstance(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this really need to be a singleton? Would prefer if it was a new instance each time unless we are concerned and have measure performance impact.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to instance per lifetime-scope
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
private Lazy<List<UserSecurityPolicy>> _policies = new Lazy<List<UserSecurityPolicy>>(InitializePoliciesList, isThreadSafe: true); | ||
|
||
internal const string MicrosoftUsername = "Microsoft"; | ||
internal const string Name = nameof(MicrosoftTeamSubscription); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be a const. Refactoring can break behavior here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True. Updated.
…otential refactoring of type name
And select correct target account for package security policies.