diff --git a/composer.json b/composer.json index eb74161ad50275cb207ee18ff961e80937d1b2f8..4d616d8166499ffcde6c546963cb74b4094687e7 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,6 @@ "drupal/honeypot": "^2.1", "drupal/maxlength": "^3.1", "drupal/pathauto": "^1.12", - "drupal/registration_role": "^2.0", "drupal/smart_date": "^4.1.2", "drupal/views_summary_tabs": "^1.0", "drupal/webform": "^6.3@beta", diff --git a/event_platform_sessions/config/install/eca.eca.process_register_speaker.yml b/event_platform_sessions/config/install/eca.eca.process_register_speaker.yml new file mode 100644 index 0000000000000000000000000000000000000000..aee355f5b7c1cb83722a8efb1ab0b2eee875f808 --- /dev/null +++ b/event_platform_sessions/config/install/eca.eca.process_register_speaker.yml @@ -0,0 +1,49 @@ +uuid: 0a87b3f2-f2c4-4191-96ae-ebf758de838f +langcode: en +status: true +dependencies: + config: + - system.action.user_add_role_action.speaker + module: + - eca_content + - eca_user +_core: + default_config_hash: C_bcCF8CnyQfimoADocs2rBC6zXOzjRl2G76S--m6ig +id: process_register_speaker +modeller: bpmn_io +label: 'Apply speaker roles to new accounts' +version: '' +weight: 0 +events: + Event_0vxgplk: + plugin: 'content_entity:insert' + label: 'Create user' + configuration: + type: 'user _all' + successors: + - + id: Activity_1q8odga + condition: Flow_0n757dt +conditions: + Flow_0n757dt: + plugin: eca_current_user_role + configuration: + role: administrator + negate: true +gateways: { } +actions: + Activity_1q8odga: + plugin: eca_switch_account + label: 'switch to root' + configuration: + user_id: '1' + successors: + - + id: Activity_1vj7gze + condition: '' + Activity_1vj7gze: + plugin: 'eca_preconfigured_action:user_add_role_action.speaker' + label: 'Add speaker role' + configuration: + object: entity + successors: { } diff --git a/event_platform_sessions/config/install/eca.model.process_register_speaker.yml b/event_platform_sessions/config/install/eca.model.process_register_speaker.yml new file mode 100644 index 0000000000000000000000000000000000000000..705335cd516820541a0b5a6f5a11072df003fb99 --- /dev/null +++ b/event_platform_sessions/config/install/eca.model.process_register_speaker.yml @@ -0,0 +1,97 @@ +uuid: f76ad480-cbbb-423e-9865-d59f178b4122 +langcode: en +status: true +dependencies: + config: + - eca.eca.process_register_speaker +_core: + default_config_hash: MYKUxNuVRI3lzsZd6d6ZAhXWwCFMs6YvN0NptwNdPkA +id: process_register_speaker +label: 'Apply speaker roles to new accounts' +tags: + - untagged +documentation: '' +filename: '' +modeldata: | + <?xml version="1.0" encoding="UTF-8"?> + <bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:qa="http://some-company/schema/bpmn/qa" id="sample-diagram" targetNamespace="http://bpmn.io/schema/bpmn" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd"> + <bpmn2:process id="process_register_speaker" name="Apply speaker roles to new accounts" isExecutable="true"> + <bpmn2:startEvent id="Event_0vxgplk" name="Create user" camunda:modelerTemplate="org.drupal.event.content_entity:insert"> + <bpmn2:extensionElements> + <camunda:properties> + <camunda:property name="pluginid" value="content_entity:insert" /> + </camunda:properties> + <camunda:field name="type"> + <camunda:string>user _all</camunda:string> + </camunda:field> + </bpmn2:extensionElements> + <bpmn2:outgoing>Flow_0n757dt</bpmn2:outgoing> + </bpmn2:startEvent> + <bpmn2:task id="Activity_1q8odga" name="switch to root" camunda:modelerTemplate="org.drupal.action.eca_switch_account"> + <bpmn2:extensionElements> + <camunda:properties> + <camunda:property name="pluginid" value="eca_switch_account" /> + </camunda:properties> + <camunda:field name="user_id"> + <camunda:string>1</camunda:string> + </camunda:field> + </bpmn2:extensionElements> + <bpmn2:incoming>Flow_0n757dt</bpmn2:incoming> + <bpmn2:outgoing>Flow_161e6wk</bpmn2:outgoing> + </bpmn2:task> + <bpmn2:sequenceFlow id="Flow_0n757dt" name="not admin" camunda:modelerTemplate="org.drupal.condition.eca_current_user_role" sourceRef="Event_0vxgplk" targetRef="Activity_1q8odga"> + <bpmn2:extensionElements> + <camunda:properties> + <camunda:property name="pluginid" value="eca_current_user_role" /> + </camunda:properties> + <camunda:field name="role"> + <camunda:string>administrator</camunda:string> + </camunda:field> + <camunda:field name="negate"> + <camunda:string>yes</camunda:string> + </camunda:field> + </bpmn2:extensionElements> + </bpmn2:sequenceFlow> + <bpmn2:task id="Activity_1vj7gze" name="Add speaker role" camunda:modelerTemplate="org.drupal.action.eca_preconfigured_action:user_add_role_action.speaker"> + <bpmn2:extensionElements> + <camunda:properties> + <camunda:property name="pluginid" value="eca_preconfigured_action:user_add_role_action.speaker" /> + </camunda:properties> + <camunda:field name="object"> + <camunda:string>entity</camunda:string> + </camunda:field> + </bpmn2:extensionElements> + <bpmn2:incoming>Flow_161e6wk</bpmn2:incoming> + </bpmn2:task> + <bpmn2:sequenceFlow id="Flow_161e6wk" sourceRef="Activity_1q8odga" targetRef="Activity_1vj7gze" /> + </bpmn2:process> + <bpmndi:BPMNDiagram id="sid-d5835fa3-421c-4cb0-b3ba-0e2e2aebfac6"> + <bpmndi:BPMNPlane id="sid-3d8da845-3c5e-484a-b9ca-7abc5d1fc478" bpmnElement="process_register_speaker"> + <bpmndi:BPMNShape id="Event_0vxgplk_di" bpmnElement="Event_0vxgplk"> + <dc:Bounds x="202" y="52" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="191" y="95" width="58" height="14" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="Activity_1q8odga_di" bpmnElement="Activity_1q8odga"> + <dc:Bounds x="340" y="30" width="100" height="80" /> + <bpmndi:BPMNLabel /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="Activity_1vj7gze_di" bpmnElement="Activity_1vj7gze"> + <dc:Bounds x="480" y="30" width="100" height="80" /> + <bpmndi:BPMNLabel /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="Flow_0n757dt_di" bpmnElement="Flow_0n757dt"> + <di:waypoint x="238" y="70" /> + <di:waypoint x="340" y="70" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="265" y="52" width="49" height="14" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="Flow_161e6wk_di" bpmnElement="Flow_161e6wk"> + <di:waypoint x="440" y="70" /> + <di:waypoint x="480" y="70" /> + </bpmndi:BPMNEdge> + </bpmndi:BPMNPlane> + </bpmndi:BPMNDiagram> + </bpmn2:definitions> diff --git a/event_platform_sessions/event_platform_sessions.info.yml b/event_platform_sessions/event_platform_sessions.info.yml index ffc5932a54a60d7ff6a49e351021f745f536b547..efa52d28109688001fcc6f74d393e647a304714c 100644 --- a/event_platform_sessions/event_platform_sessions.info.yml +++ b/event_platform_sessions/event_platform_sessions.info.yml @@ -16,6 +16,5 @@ dependencies: - hide_revision_field:hide_revision_field - honeypot:honeypot - maxlength:maxlength - - registration_role:registration_role - smart_date:smart_date - views_summary_tabs:views_summary_tabs diff --git a/event_platform_sessions/event_platform_sessions.install b/event_platform_sessions/event_platform_sessions.install index 8410162ee2dc80ece5f2c9c9776037c147871cb1..5919dafb48eeded23012b17d80552a9b363594b3 100644 --- a/event_platform_sessions/event_platform_sessions.install +++ b/event_platform_sessions/event_platform_sessions.install @@ -12,14 +12,6 @@ use Drupal\user\Entity\Role; * Implements hook_install(). */ function event_platform_sessions_install() { - // Update registration_role config. - $config = \Drupal::configFactory()->getEditable('registration_role.setting'); - $config->set('role_to_select', ['speaker' => 'speaker'])->save(); - - // Update registration_role config. - $config = \Drupal::configFactory()->getEditable('user.settings'); - $config->set('register', 'visitors')->save(); - // Add permission to view field_r and field_time_slot. foreach (['anonymous', 'authenticated'] as $role) { $role_object = Role::load($role);