From ea5ed1d3a835eb1506480f0fe537a19a278842d1 Mon Sep 17 00:00:00 2001 From: Rolf Date: Fri, 13 Dec 2024 15:08:19 +0100 Subject: [PATCH 1/2] Update Versioning.php --- includes/Modules/Versioning/Versioning.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/Modules/Versioning/Versioning.php b/includes/Modules/Versioning/Versioning.php index 42cd005..9d30f69 100644 --- a/includes/Modules/Versioning/Versioning.php +++ b/includes/Modules/Versioning/Versioning.php @@ -245,7 +245,7 @@ public function filter_post_row_actions($actions, $post) . '">' . __('Kopieren', 'cms-workflow') . ''; } - if (current_user_can($cap->edit_posts) && $post->post_status == 'publish' && ($this->is_author(get_current_user_id(), $post->ID) || current_user_can('manage_options'))) { + if (current_user_can($cap->edit_posts) && $post->post_status == 'publish' && ($this->is_author(get_current_user_id(), $post->ID) || current_user_can('edit_published_posts'))) { $actions['edit_as_version'] = '' . __('Neue Version', 'cms-workflow') . ''; @@ -287,7 +287,7 @@ public function version_as_new_post_draft() $cap = $this->get_available_post_types($post->post_type)->cap; - if (!current_user_can($cap->edit_posts) || $post->post_status != 'publish' || (!$this->is_author(get_current_user_id(), $post->ID) && !current_user_can('manage_options'))) { + if (!current_user_can($cap->edit_posts) || $post->post_status != 'publish' || (!$this->is_author(get_current_user_id(), $post->ID) && !current_user_can('edit_published_posts'))) { wp_die(__('Sie haben nicht die erforderlichen Rechte, um eine neue Version zu erstellen.', 'cms-workflow')); } @@ -457,7 +457,7 @@ public function admin_notices() $permalink = get_permalink($old_post_id); $post_title = get_the_title($old_post_id); - if (current_user_can('manage_categories')) { + if (current_user_can('edit_published_posts')) { $this->show_admin_notice(sprintf(__('Lokale Version vom Dokument „%2$s“. Überschreiben Sie das ursprüngliche Dokument, indem Sie auf „Veröffentlichen” klicken.', 'cms-workflow'), $permalink, $post_title)); } else { $this->show_admin_notice(sprintf(__('Lokale Version vom Dokument „%2$s“.', 'cms-workflow'), $permalink, $post_title)); @@ -1362,7 +1362,7 @@ public function admin_bar_submenu() } $cap = $this->get_available_post_types($post->post_type)->cap; - if (current_user_can($cap->edit_posts) && $post->post_status == 'publish' && ($this->is_author(get_current_user_id(), $post->ID) || current_user_can('manage_options'))) { + if (current_user_can($cap->edit_posts) && $post->post_status == 'publish' && ($this->is_author(get_current_user_id(), $post->ID) || current_user_can('edit_published_posts'))) { } else { return; } From 79b6097885352e0503d46c381328864d0eb61563 Mon Sep 17 00:00:00 2001 From: Rolf Date: Fri, 13 Dec 2024 15:08:22 +0100 Subject: [PATCH 2/2] Update cms-workflow.php --- cms-workflow.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cms-workflow.php b/cms-workflow.php index 3d32880..0a0dd73 100644 --- a/cms-workflow.php +++ b/cms-workflow.php @@ -4,7 +4,7 @@ Plugin Name: CMS-Workflow Plugin URI: https://github.com/RRZE-Webteam/cms-workflow Description: Redaktioneller Workflow. -Version: 2.0.0 +Version: 2.0.1 Author: RRZE Webteam Author URI: https://blogs.fau.de/webworking/ License: GNU General Public License v2