mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
feat(Linear Trigger Node): Add support for admin scope (#12211)
This commit is contained in:
@@ -1,7 +1,5 @@
|
|||||||
import type { ICredentialType, INodeProperties } from 'n8n-workflow';
|
import type { ICredentialType, INodeProperties } from 'n8n-workflow';
|
||||||
|
|
||||||
const scopes = ['read', 'write', 'issues:create', 'comments:create'];
|
|
||||||
|
|
||||||
export class LinearOAuth2Api implements ICredentialType {
|
export class LinearOAuth2Api implements ICredentialType {
|
||||||
name = 'linearOAuth2Api';
|
name = 'linearOAuth2Api';
|
||||||
|
|
||||||
@@ -50,11 +48,19 @@ export class LinearOAuth2Api implements ICredentialType {
|
|||||||
],
|
],
|
||||||
default: 'user',
|
default: 'user',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
displayName: 'Include Admin Scope',
|
||||||
|
name: 'includeAdminScope',
|
||||||
|
type: 'boolean',
|
||||||
|
default: false,
|
||||||
|
description: 'Grants the "Admin" scope, Needed to create webhooks',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Scope',
|
displayName: 'Scope',
|
||||||
name: 'scope',
|
name: 'scope',
|
||||||
type: 'hidden',
|
type: 'hidden',
|
||||||
default: scopes.join(' '),
|
default:
|
||||||
|
'={{$self["includeAdminScope"] ? "read write issues:create comments:create admin" : "read write issues:create comments:create"}}',
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user