* Admins also do not need permission to edit their posts
This commit is contained in:
parent
c3fbf44502
commit
58a39ccc48
3 changed files with 3 additions and 3 deletions
|
@ -33,7 +33,7 @@ class Edit extends Page
|
|||
$this->c->Lang->load('post');
|
||||
|
||||
if ($method === 'POST') {
|
||||
$v = $this->messageValidator($topic, 'EditPost', $args, true, $editSubject);
|
||||
$v = $this->messageValidator($post, 'EditPost', $args, true, $editSubject);
|
||||
|
||||
if ($v->validation($_POST) && null === $v->preview) {
|
||||
return $this->endEdit($post, $v);
|
||||
|
|
|
@ -124,7 +124,7 @@ trait PostFormTrait
|
|||
'checked' => isset($vars['merge_post']) ? (bool) $vars['merge_post'] : true,
|
||||
];
|
||||
}
|
||||
if ($editPost && ! $model->user->isGuest) {
|
||||
if ($editPost && ! $model->user->isGuest && ! $model->user->isAdmin) {
|
||||
$fieldset['edit_post'] = [
|
||||
'type' => 'checkbox',
|
||||
'label' => \ForkBB\__('EditPost edit'),
|
||||
|
|
|
@ -120,7 +120,7 @@ trait PostValidatorTrait
|
|||
} else {
|
||||
$ruleMergePost = 'absent';
|
||||
}
|
||||
if ($editPost) {
|
||||
if ($editPost && ! $model->user->isGuest && ! $model->user->isAdmin) {
|
||||
$ruleEditPost = 'checkbox';
|
||||
} else {
|
||||
$ruleEditPost = 'absent';
|
||||
|
|
Loading…
Add table
Reference in a new issue