mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-26 05:04:05 -08:00
0ecbb4a19d
* 🔨 prettier formated nodes - A * 🔨 prettier formated nodes - B * ⚡ prettier formated nodes - C * ⚡ prettier formated nodes - D * ⚡ prettier formated nodes - E-F * 🎨 Adjust nodes-base formatting command (#3805) * Format additional files in nodes A-F (#3811) * ⚡ fixes * 🎨 Add Mindee to ignored dirs Co-authored-by: Iván Ovejero <ivov.src@gmail.com>
99 lines
2.2 KiB
TypeScript
99 lines
2.2 KiB
TypeScript
import { INodeProperties } from 'n8n-workflow';
|
|
|
|
export const userGroupOperations: INodeProperties[] = [
|
|
{
|
|
displayName: 'Operation',
|
|
name: 'operation',
|
|
type: 'options',
|
|
noDataExpression: true,
|
|
description: 'Choose an operation',
|
|
required: true,
|
|
displayOptions: {
|
|
show: {
|
|
resource: ['userGroup'],
|
|
},
|
|
},
|
|
options: [
|
|
{
|
|
name: 'Add',
|
|
value: 'add',
|
|
description: 'Create a user to group',
|
|
action: 'Add a user to a group',
|
|
},
|
|
{
|
|
name: 'Remove',
|
|
value: 'remove',
|
|
description: 'Remove user from group',
|
|
action: 'Remove a user from a group',
|
|
},
|
|
],
|
|
default: 'add',
|
|
},
|
|
];
|
|
|
|
export const userGroupFields: INodeProperties[] = [
|
|
/* -------------------------------------------------------------------------- */
|
|
/* userGroup:add */
|
|
/* -------------------------------------------------------------------------- */
|
|
{
|
|
displayName: 'Usernames',
|
|
name: 'usernames',
|
|
type: 'string',
|
|
required: true,
|
|
displayOptions: {
|
|
show: {
|
|
resource: ['userGroup'],
|
|
operation: ['add'],
|
|
},
|
|
},
|
|
default: '',
|
|
description: 'Usernames to add to group. Multiples can be defined separated by comma.',
|
|
},
|
|
{
|
|
displayName: 'Group ID',
|
|
name: 'groupId',
|
|
type: 'string',
|
|
required: true,
|
|
displayOptions: {
|
|
show: {
|
|
resource: ['userGroup'],
|
|
operation: ['add'],
|
|
},
|
|
},
|
|
default: '',
|
|
description: 'ID of the group',
|
|
},
|
|
|
|
/* -------------------------------------------------------------------------- */
|
|
/* userGroup:remove */
|
|
/* -------------------------------------------------------------------------- */
|
|
{
|
|
displayName: 'Usernames',
|
|
name: 'usernames',
|
|
type: 'string',
|
|
required: true,
|
|
displayOptions: {
|
|
show: {
|
|
resource: ['userGroup'],
|
|
operation: ['remove'],
|
|
},
|
|
},
|
|
default: '',
|
|
description: 'Usernames to remove from group. Multiples can be defined separated by comma.',
|
|
},
|
|
{
|
|
displayName: 'Group ID',
|
|
name: 'groupId',
|
|
type: 'string',
|
|
required: true,
|
|
displayOptions: {
|
|
show: {
|
|
resource: ['userGroup'],
|
|
operation: ['remove'],
|
|
},
|
|
},
|
|
default: '',
|
|
description: 'ID of the group to remove',
|
|
},
|
|
];
|