Skip to content

Commit 2c4e58f

Browse files
authored
Merge pull request #139 from RRZE-Webteam/dev
Dev
2 parents 7af5166 + 79b6097 commit 2c4e58f

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

cms-workflow.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Plugin Name: CMS-Workflow
55
Plugin URI: https://github.com/RRZE-Webteam/cms-workflow
66
Description: Redaktioneller Workflow.
7-
Version: 2.0.0
7+
Version: 2.0.1
88
Author: RRZE Webteam
99
Author URI: https://blogs.fau.de/webworking/
1010
License: GNU General Public License v2

includes/Modules/Versioning/Versioning.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ public function filter_post_row_actions($actions, $post)
245245
. '">' . __('Kopieren', 'cms-workflow') . '</a>';
246246
}
247247

248-
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'))) {
248+
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'))) {
249249
$actions['edit_as_version'] = '<a href="' . admin_url('admin.php?action=version_as_new_post_draft&post=' . $post->ID) . '" title="'
250250
. esc_attr(__('Dieses Element als neue Version duplizieren', 'cms-workflow'))
251251
. '">' . __('Neue Version', 'cms-workflow') . '</a>';
@@ -287,7 +287,7 @@ public function version_as_new_post_draft()
287287

288288
$cap = $this->get_available_post_types($post->post_type)->cap;
289289

290-
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'))) {
290+
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'))) {
291291
wp_die(__('Sie haben nicht die erforderlichen Rechte, um eine neue Version zu erstellen.', 'cms-workflow'));
292292
}
293293

@@ -457,7 +457,7 @@ public function admin_notices()
457457
$permalink = get_permalink($old_post_id);
458458
$post_title = get_the_title($old_post_id);
459459

460-
if (current_user_can('manage_categories')) {
460+
if (current_user_can('edit_published_posts')) {
461461
$this->show_admin_notice(sprintf(__('Lokale Version vom Dokument &bdquo;<a href="%1$s" target="__blank">%2$s</a>&ldquo;. Überschreiben Sie das ursprüngliche Dokument, indem Sie auf &bdquo;Veröffentlichen&rdquo; klicken.', 'cms-workflow'), $permalink, $post_title));
462462
} else {
463463
$this->show_admin_notice(sprintf(__('Lokale Version vom Dokument &bdquo;<a href="%1$s" target="__blank">%2$s</a>&ldquo;.', 'cms-workflow'), $permalink, $post_title));
@@ -1362,7 +1362,7 @@ public function admin_bar_submenu()
13621362
}
13631363

13641364
$cap = $this->get_available_post_types($post->post_type)->cap;
1365-
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'))) {
1365+
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'))) {
13661366
} else {
13671367
return;
13681368
}

0 commit comments

Comments
 (0)