diff --git a/config/install/content_lock.settings.yml b/config/install/content_lock.settings.yml index 7d32b87..0c21339 100644 --- a/config/install/content_lock.settings.yml +++ b/config/install/content_lock.settings.yml @@ -1,3 +1,5 @@ verbose: 1 types: {} types_form_op_lock: {} +form_op_white_list: {} +form_op_black_list: {} diff --git a/config/schema/content_lock.schema.yml b/config/schema/content_lock.schema.yml index 6baba19..e2ca10b 100644 --- a/config/schema/content_lock.schema.yml +++ b/config/schema/content_lock.schema.yml @@ -14,5 +14,23 @@ content_lock.settings: type: string label: 'Bundle type' types_form_op_lock: - type: sequence - label: 'Entity types with entity form operation lock on' + type: sequence + label: 'Entity types with entity form operation lock on' + form_op_white_list: + type: sequence + label: 'Whitelisted form operations per entity type' + sequence: + type: sequence + label: 'Entity type' + sequence: + type: string + label: 'Whitelisted form operations' + form_op_black_list: + type: sequence + label: 'Blacklisted form operations per entity type' + sequence: + type: sequence + label: 'Entity type' + sequence: + type: string + label: 'blacklisted form operations' \ No newline at end of file diff --git a/src/ContentLock/ContentLock.php b/src/ContentLock/ContentLock.php index 6183a04..cff36ff 100644 --- a/src/ContentLock/ContentLock.php +++ b/src/ContentLock/ContentLock.php @@ -543,6 +543,9 @@ class ContentLock extends ServiceProviderBase { } return TRUE; } + else { + return TRUE; + } } else { return TRUE; diff --git a/src/Tests/ContentLockTestBase.php b/src/Tests/ContentLockTestBase.php index 720cd45..0ce1373 100644 --- a/src/Tests/ContentLockTestBase.php +++ b/src/Tests/ContentLockTestBase.php @@ -213,7 +213,7 @@ class ContentLockTestBase extends WebTestBase { // We protect the bundle created. $this->drupalLogin($this->adminUser); $edit = [ - 'node[article]' => 1, + 'node[bundles][article]' => 1, ]; $this->drupalPostForm('admin/config/content/contentlocksettings', $edit, t('Save configuration')); @@ -275,7 +275,7 @@ class ContentLockTestBase extends WebTestBase { // We protect the bundle created. $this->drupalLogin($this->adminUser); $edit = [ - 'block_content[basic]' => 1, + 'block_content[bundles][basic]' => 1, ]; $this->drupalPostForm('admin/config/content/contentlocksettings', $edit, t('Save configuration')); @@ -334,7 +334,7 @@ class ContentLockTestBase extends WebTestBase { // We protect the bundle created. $this->drupalLogin($this->adminUser); $edit = [ - 'taxonomy_term[' . $this->term1->bundle() . ']' => 1, + 'taxonomy_term[bundles][' . $this->term1->bundle() . ']' => 1, ]; $this->drupalPostForm('admin/config/content/contentlocksettings', $edit, t('Save configuration'));