-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Permissions: Added User fallback permission condition (closes #20097) #20224
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
Merged
leekelleher
merged 2 commits into
main
from
v16/bugfix/user-fallback-permission-condition
Oct 8, 2025
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
src/Umbraco.Web.UI.Client/examples/user-permission/constants.ts
This file contains hidden or 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,4 @@ | ||
| // eslint-disable-next-line @typescript-eslint/naming-convention | ||
| export const EXAMPLE_USER_PERMISSION_DICTIONARY_ACTION_1 = 'Example.Dictionary.Action1'; | ||
| // eslint-disable-next-line @typescript-eslint/naming-convention | ||
| export const EXAMPLE_USER_PERMISSION_DICTIONARY_ACTION_2 = 'Example.Dictionary.Action2'; |
9 changes: 9 additions & 0 deletions
9
src/Umbraco.Web.UI.Client/examples/user-permission/entity-action/action-1.ts
This file contains hidden or 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,9 @@ | ||
| import { UmbEntityActionBase } from '@umbraco-cms/backoffice/entity-action'; | ||
|
|
||
| export class ExampleAction1EntityAction extends UmbEntityActionBase<never> { | ||
| override async execute() { | ||
| alert('Example action 1 executed'); | ||
| } | ||
| } | ||
|
|
||
| export { ExampleAction1EntityAction as default }; | ||
9 changes: 9 additions & 0 deletions
9
src/Umbraco.Web.UI.Client/examples/user-permission/entity-action/action-2.ts
This file contains hidden or 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,9 @@ | ||
| import { UmbEntityActionBase } from '@umbraco-cms/backoffice/entity-action'; | ||
|
|
||
| export class ExampleAction2EntityAction extends UmbEntityActionBase<never> { | ||
| override async execute() { | ||
| alert('Example action 2 executed'); | ||
madsrasmussen marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| } | ||
| } | ||
|
|
||
| export { ExampleAction2EntityAction as default }; | ||
47 changes: 47 additions & 0 deletions
47
src/Umbraco.Web.UI.Client/examples/user-permission/entity-action/manifests.ts
This file contains hidden or 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,47 @@ | ||
| import { | ||
| EXAMPLE_USER_PERMISSION_DICTIONARY_ACTION_1, | ||
| EXAMPLE_USER_PERMISSION_DICTIONARY_ACTION_2, | ||
| } from '../constants.js'; | ||
| import { UMB_DICTIONARY_ENTITY_TYPE } from '@umbraco-cms/backoffice/dictionary'; | ||
| import { UMB_FALLBACK_USER_PERMISSION_CONDITION_ALIAS } from '@umbraco-cms/backoffice/user-permission'; | ||
|
|
||
| export const manifests: Array<UmbExtensionManifest> = [ | ||
| { | ||
| type: 'entityAction', | ||
| kind: 'default', | ||
| alias: 'Example.EntityAction.Action1', | ||
| name: 'Action 1 Entity Action', | ||
| forEntityTypes: [UMB_DICTIONARY_ENTITY_TYPE], | ||
| api: () => import('./action-1.js'), | ||
| weight: 10000, | ||
| meta: { | ||
| label: 'Action 1', | ||
| icon: 'icon-car', | ||
| }, | ||
| conditions: [ | ||
| { | ||
| alias: UMB_FALLBACK_USER_PERMISSION_CONDITION_ALIAS, | ||
| allOf: [EXAMPLE_USER_PERMISSION_DICTIONARY_ACTION_1], | ||
| }, | ||
| ], | ||
| }, | ||
| { | ||
| type: 'entityAction', | ||
| kind: 'default', | ||
| alias: 'Example.EntityAction.Action2', | ||
| name: 'Action 2 Entity Action', | ||
| forEntityTypes: [UMB_DICTIONARY_ENTITY_TYPE], | ||
| api: () => import('./action-2.js'), | ||
| weight: 9000, | ||
| meta: { | ||
| label: 'Action 2', | ||
| icon: 'icon-bus', | ||
| }, | ||
| conditions: [ | ||
| { | ||
| alias: UMB_FALLBACK_USER_PERMISSION_CONDITION_ALIAS, | ||
| allOf: [EXAMPLE_USER_PERMISSION_DICTIONARY_ACTION_2], | ||
| }, | ||
| ], | ||
| }, | ||
| ]; |
30 changes: 30 additions & 0 deletions
30
src/Umbraco.Web.UI.Client/examples/user-permission/entity-user-permission/manifests.ts
This file contains hidden or 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,30 @@ | ||
| import { | ||
| EXAMPLE_USER_PERMISSION_DICTIONARY_ACTION_1, | ||
| EXAMPLE_USER_PERMISSION_DICTIONARY_ACTION_2, | ||
| } from '../constants.js'; | ||
| import { UMB_DICTIONARY_ENTITY_TYPE } from '@umbraco-cms/backoffice/dictionary'; | ||
|
|
||
| export const manifests: Array<UmbExtensionManifest> = [ | ||
| { | ||
| type: 'entityUserPermission', | ||
| alias: 'Example.EntityUserPermission.Entity.Action1', | ||
| name: 'Action 1 for Entity User Permission', | ||
| forEntityTypes: [UMB_DICTIONARY_ENTITY_TYPE], | ||
| meta: { | ||
| verbs: [EXAMPLE_USER_PERMISSION_DICTIONARY_ACTION_1], | ||
| label: 'Action 1', | ||
| description: 'Description for action 1', | ||
| }, | ||
| }, | ||
| { | ||
| type: 'entityUserPermission', | ||
| alias: 'Example.EntityUserPermission.Entity.Action2', | ||
| name: 'Action 2 for Entity User Permission', | ||
| forEntityTypes: [UMB_DICTIONARY_ENTITY_TYPE], | ||
| meta: { | ||
| verbs: [EXAMPLE_USER_PERMISSION_DICTIONARY_ACTION_2], | ||
| label: 'Action 2', | ||
| description: 'Description for action 2', | ||
| }, | ||
| }, | ||
| ]; |
This file contains hidden or 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,9 @@ | ||
| import { manifests as entityUserPermissionManifests } from './entity-user-permission/manifests.js'; | ||
| import { manifests as entityActionManifests } from './entity-action/manifests.js'; | ||
| import { manifests as localizationManifests } from './localization/manifests.js'; | ||
|
|
||
| export const manifests: Array<UmbExtensionManifest> = [ | ||
| ...entityUserPermissionManifests, | ||
| ...entityActionManifests, | ||
| ...localizationManifests, | ||
| ]; |
6 changes: 6 additions & 0 deletions
6
src/Umbraco.Web.UI.Client/examples/user-permission/localization/en.ts
This file contains hidden or 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,6 @@ | ||
| export default { | ||
| user: { | ||
| // eslint-disable-next-line @typescript-eslint/naming-convention | ||
| permissionsEntityGroup_dictionary: 'Dictionary', | ||
| }, | ||
| }; |
12 changes: 12 additions & 0 deletions
12
src/Umbraco.Web.UI.Client/examples/user-permission/localization/manifests.ts
This file contains hidden or 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,12 @@ | ||
| export const manifests: Array<UmbExtensionManifest> = [ | ||
| { | ||
| type: 'localization', | ||
| alias: 'Example.UserPermission.Localization.En', | ||
| name: 'en-US User Permission Localization Example', | ||
| js: () => import('./en.js'), | ||
| weight: 1, | ||
| meta: { | ||
| culture: 'en', | ||
| }, | ||
| }, | ||
| ]; |
1 change: 1 addition & 0 deletions
1
src/Umbraco.Web.UI.Client/src/packages/user/user-permission/constants.ts
This file contains hidden or 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 @@ | ||
| export * from './fallback-permission-condition/constants.js'; |
1 change: 1 addition & 0 deletions
1
...eb.UI.Client/src/packages/user/user-permission/fallback-permission-condition/constants.ts
This file contains hidden or 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 @@ | ||
| export const UMB_FALLBACK_USER_PERMISSION_CONDITION_ALIAS = 'Umb.Condition.UserPermission.Fallback'; |
142 changes: 142 additions & 0 deletions
142
.../user-permission/fallback-permission-condition/fallback-user-permission.condition.test.ts
This file contains hidden or 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,142 @@ | ||
| import { expect } from '@open-wc/testing'; | ||
| import { customElement } from '@umbraco-cms/backoffice/external/lit'; | ||
| import { UmbControllerHostElementMixin } from '@umbraco-cms/backoffice/controller-api'; | ||
| import { UmbCurrentUserContext, UmbCurrentUserStore } from '@umbraco-cms/backoffice/current-user'; | ||
| import { UmbNotificationContext } from '@umbraco-cms/backoffice/notification'; | ||
| import { UmbFallbackUserPermissionCondition } from './fallback-user-permission.condition'; | ||
| import { UMB_USER_PERMISSION_DOCUMENT_READ } from '@umbraco-cms/backoffice/document'; | ||
| import { UMB_FALLBACK_USER_PERMISSION_CONDITION_ALIAS } from './constants'; | ||
|
|
||
| @customElement('test-controller-host') | ||
| class UmbTestControllerHostElement extends UmbControllerHostElementMixin(HTMLElement) { | ||
| currentUserContext = new UmbCurrentUserContext(this); | ||
|
|
||
| constructor() { | ||
| super(); | ||
| new UmbNotificationContext(this); | ||
| new UmbCurrentUserStore(this); | ||
| } | ||
|
|
||
| async init() { | ||
| await this.currentUserContext.load(); | ||
| } | ||
| } | ||
|
|
||
| describe('UmbFallbackUserPermissionCondition', () => { | ||
| let hostElement: UmbTestControllerHostElement; | ||
| let condition: UmbFallbackUserPermissionCondition; | ||
|
|
||
| beforeEach(async () => { | ||
| hostElement = new UmbTestControllerHostElement(); | ||
| document.body.appendChild(hostElement); | ||
| await hostElement.init(); | ||
| }); | ||
|
|
||
| afterEach(() => { | ||
| document.body.innerHTML = ''; | ||
| }); | ||
|
|
||
| describe('Fallback Permissions', () => { | ||
| it('should permit the condition when allOf is satisfied', (done) => { | ||
| let callbackCount = 0; | ||
|
|
||
| // We expect to find the read permission in the fallback permissions | ||
| condition = new UmbFallbackUserPermissionCondition(hostElement, { | ||
| host: hostElement, | ||
| config: { | ||
| alias: UMB_FALLBACK_USER_PERMISSION_CONDITION_ALIAS, | ||
| allOf: [UMB_USER_PERMISSION_DOCUMENT_READ], | ||
| }, | ||
| onChange: () => { | ||
| callbackCount++; | ||
| if (callbackCount === 1) { | ||
| expect(condition.permitted).to.be.true; | ||
| condition.hostDisconnected(); | ||
| done(); | ||
| } | ||
| }, | ||
| }); | ||
| }); | ||
|
Check warning on line 59 in src/Umbraco.Web.UI.Client/src/packages/user/user-permission/fallback-permission-condition/fallback-user-permission.condition.test.ts
|
||
|
|
||
| it('should forbid the condition when allOf is not satisfied', (done) => { | ||
| let callbackCount = 0; | ||
|
|
||
| // We expect to find the read permission in the fallback permissions | ||
| condition = new UmbFallbackUserPermissionCondition(hostElement, { | ||
| host: hostElement, | ||
| config: { | ||
| alias: UMB_FALLBACK_USER_PERMISSION_CONDITION_ALIAS, | ||
| allOf: [UMB_USER_PERMISSION_DOCUMENT_READ, 'non-existing-permission'], | ||
| }, | ||
| onChange: () => { | ||
| callbackCount++; | ||
| if (callbackCount === 1) { | ||
| expect(condition.permitted).to.be.false; | ||
| condition.hostDisconnected(); | ||
| done(); | ||
| } | ||
| }, | ||
| }); | ||
|
|
||
| // The onChange callback is not called when the condition is false, so we need to wait and check manually | ||
| setTimeout(() => { | ||
| expect(condition.permitted).to.be.false; | ||
| condition.hostDisconnected(); | ||
| done(); | ||
| }, 200); | ||
| }); | ||
|
|
||
| it('should permit the condition when oneOf is satisfied', (done) => { | ||
| let callbackCount = 0; | ||
|
|
||
| // We expect to find the read permission in the fallback permissions | ||
| condition = new UmbFallbackUserPermissionCondition(hostElement, { | ||
| host: hostElement, | ||
| config: { | ||
| alias: UMB_FALLBACK_USER_PERMISSION_CONDITION_ALIAS, | ||
| oneOf: [UMB_USER_PERMISSION_DOCUMENT_READ, 'non-existing-permission'], | ||
| }, | ||
| onChange: () => { | ||
| /* The onChange callback is not called when the condition is false, so this should never be called | ||
| But in case it is, we want to fail the test */ | ||
| callbackCount++; | ||
| if (callbackCount === 1) { | ||
| expect(condition.permitted).to.be.true; | ||
| condition.hostDisconnected(); | ||
| done(); | ||
| } | ||
| }, | ||
| }); | ||
| }); | ||
|
|
||
| it('should forbid the condition when oneOf is not satisfied', (done) => { | ||
| let callbackCount = 0; | ||
|
|
||
| // We expect to find the read permission in the fallback permissions | ||
| condition = new UmbFallbackUserPermissionCondition(hostElement, { | ||
| host: hostElement, | ||
| config: { | ||
| alias: UMB_FALLBACK_USER_PERMISSION_CONDITION_ALIAS, | ||
| oneOf: ['non-existing-permission', 'another-non-existing-permission'], | ||
| }, | ||
| onChange: () => { | ||
| /* The onChange callback is not called when the condition is false, so this should never be called | ||
| But in case it is, we want to fail the test */ | ||
| callbackCount++; | ||
| if (callbackCount === 1) { | ||
| expect(condition.permitted).to.be.false; | ||
| condition.hostDisconnected(); | ||
| done(); | ||
| } | ||
| }, | ||
| }); | ||
|
|
||
| // The onChange callback is not called when the condition is false, so we need to wait and check manually | ||
| setTimeout(() => { | ||
| expect(condition.permitted).to.be.false; | ||
| condition.hostDisconnected(); | ||
| done(); | ||
| }, 200); | ||
| }); | ||
| }); | ||
| }); | ||
55 changes: 55 additions & 0 deletions
55
.../user/user-permission/fallback-permission-condition/fallback-user-permission.condition.ts
This file contains hidden or 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,55 @@ | ||
| import type { UmbFallbackUserPermissionConditionConfig } from './types.js'; | ||
| import { UMB_CURRENT_USER_CONTEXT } from '@umbraco-cms/backoffice/current-user'; | ||
| import type { UmbConditionControllerArguments, UmbExtensionCondition } from '@umbraco-cms/backoffice/extension-api'; | ||
| import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api'; | ||
| import { UmbConditionBase } from '@umbraco-cms/backoffice/extension-registry'; | ||
|
|
||
| export class UmbFallbackUserPermissionCondition | ||
| extends UmbConditionBase<UmbFallbackUserPermissionConditionConfig> | ||
| implements UmbExtensionCondition | ||
| { | ||
| constructor( | ||
| host: UmbControllerHost, | ||
| args: UmbConditionControllerArguments<UmbFallbackUserPermissionConditionConfig>, | ||
| ) { | ||
| super(host, args); | ||
|
|
||
| this.consumeContext(UMB_CURRENT_USER_CONTEXT, (context) => { | ||
| this.observe( | ||
| context?.currentUser, | ||
| (currentUser) => { | ||
| const fallbackPermissions = currentUser?.fallbackPermissions || []; | ||
| this.#check(fallbackPermissions); | ||
| }, | ||
| 'umbUserFallbackPermissionConditionObserver', | ||
| ); | ||
| }); | ||
| } | ||
|
|
||
| #check(verbs: Array<string>) { | ||
| /* we default to true se we don't require both allOf and oneOf to be defined | ||
madsrasmussen marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| but they can be combined for more complex scenarios */ | ||
| let allOfPermitted = true; | ||
| let oneOfPermitted = true; | ||
|
|
||
| // check if all of the verbs are present | ||
| if (this.config.allOf?.length) { | ||
| allOfPermitted = this.config.allOf.every((verb) => verbs.includes(verb)); | ||
| } | ||
|
|
||
| // check if at least one of the verbs is present | ||
| if (this.config.oneOf?.length) { | ||
| oneOfPermitted = this.config.oneOf.some((verb) => verbs.includes(verb)); | ||
| } | ||
|
|
||
| // if neither allOf or oneOf is defined we default to false | ||
| if (!allOfPermitted && !oneOfPermitted) { | ||
madsrasmussen marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| allOfPermitted = false; | ||
| oneOfPermitted = false; | ||
| } | ||
|
|
||
| this.permitted = allOfPermitted && oneOfPermitted; | ||
| } | ||
| } | ||
|
|
||
| export { UmbFallbackUserPermissionCondition as api }; | ||
10 changes: 10 additions & 0 deletions
10
...eb.UI.Client/src/packages/user/user-permission/fallback-permission-condition/manifests.ts
This file contains hidden or 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,10 @@ | ||
| import { UMB_FALLBACK_USER_PERMISSION_CONDITION_ALIAS } from './constants.js'; | ||
|
|
||
| export const manifests: Array<UmbExtensionManifest> = [ | ||
| { | ||
| type: 'condition', | ||
| name: 'User Fallback Permission Condition', | ||
| alias: UMB_FALLBACK_USER_PERMISSION_CONDITION_ALIAS, | ||
| api: () => import('./fallback-user-permission.condition.js'), | ||
| }, | ||
| ]; |
24 changes: 24 additions & 0 deletions
24
...co.Web.UI.Client/src/packages/user/user-permission/fallback-permission-condition/types.ts
This file contains hidden or 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,24 @@ | ||
| import type { UmbConditionConfigBase } from '@umbraco-cms/backoffice/extension-api'; | ||
|
|
||
| export type UmbFallbackUserPermissionConditionConfig = | ||
| UmbConditionConfigBase<'Umb.Condition.UserPermission.Fallback'> & { | ||
| /** | ||
| * The user must have all of the permissions in this array for the condition to be met. | ||
| * @example | ||
| * ["Umb.PermissionOne", "Umb.PermissionTwo"] | ||
| */ | ||
| allOf?: Array<string>; | ||
|
|
||
| /** | ||
| * The user must have at least one of the permissions in this array for the condition to be met. | ||
| * @example | ||
| * ["Umb.PermissionOne", "Umb.PermissionTwo"] | ||
| */ | ||
| oneOf?: Array<string>; | ||
| }; | ||
|
|
||
| declare global { | ||
| interface UmbExtensionConditionConfigMap { | ||
| UmbFallbackUserPermissionConditionConfig: UmbFallbackUserPermissionConditionConfig; | ||
| } | ||
| } |
1 change: 1 addition & 0 deletions
1
src/Umbraco.Web.UI.Client/src/packages/user/user-permission/index.ts
This file contains hidden or 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 |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| export * from './components/index.js'; | ||
| export * from './constants.js'; | ||
| export * from './modals/index.js'; | ||
|
|
||
| export type * from './types.js'; |
3 changes: 2 additions & 1 deletion
3
src/Umbraco.Web.UI.Client/src/packages/user/user-permission/manifests.ts
This file contains hidden or 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 |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| import { manifests as userPermissionModalManifests } from './modals/manifests.js'; | ||
| import { manifests as fallbackConditionPermission } from './fallback-permission-condition/manifests.js'; | ||
|
|
||
| export const manifests: Array<UmbExtensionManifest> = [...userPermissionModalManifests]; | ||
| export const manifests: Array<UmbExtensionManifest> = [...userPermissionModalManifests, ...fallbackConditionPermission]; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.