mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-19 19:11:13 +00:00
52 lines
1.1 KiB
TypeScript
52 lines
1.1 KiB
TypeScript
import type { INodeProperties } from 'n8n-workflow';
|
|
import { updateDisplayOptions } from 'n8n-workflow';
|
|
|
|
import { groupLocator, userLocator } from '../common';
|
|
|
|
const properties: INodeProperties[] = [
|
|
{
|
|
...userLocator,
|
|
description: 'Select the user you want to remove from the group',
|
|
},
|
|
{
|
|
...groupLocator,
|
|
description: 'Select the group you want to remove the user from',
|
|
modes: [
|
|
{
|
|
displayName: 'From list',
|
|
name: 'list',
|
|
type: 'list',
|
|
typeOptions: {
|
|
searchListMethod: 'searchGroupsForUser',
|
|
searchable: true,
|
|
},
|
|
},
|
|
{
|
|
displayName: 'By Name',
|
|
name: 'groupName',
|
|
type: 'string',
|
|
hint: 'Enter the group name',
|
|
validation: [
|
|
{
|
|
type: 'regex',
|
|
properties: {
|
|
regex: '^[\\w+=,.@-]+$',
|
|
errorMessage: 'The group name must follow the allowed pattern',
|
|
},
|
|
},
|
|
],
|
|
placeholder: 'e.g. Admins',
|
|
},
|
|
],
|
|
},
|
|
];
|
|
|
|
const displayOptions = {
|
|
show: {
|
|
resource: ['user'],
|
|
operation: ['removeFromGroup'],
|
|
},
|
|
};
|
|
|
|
export const description = updateDisplayOptions(displayOptions, properties);
|