Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Prevent A Single User From Editing His "Own" Posts?
So, a user needs to chill out, but he responds to a moderator edit
(which removed a personal attack on another member, a move
he should have realized was in his best interest) by editing the
moderator's edit, and putting his unfortunate comment back in!
One can close a discussion, but this shuts down the otherwise
productive discussion.
Is there any way to simply remove "edit" permission from
a single user (or a Role) so that he may post, but cannot
play such games like "edit wars"?
Or is there a way to moderate, and thereby change the
"ownership" of a post without changing the displayed
"posting Member's name" for that post?
Yes, one could also simply ban the Member, but this would
be heavy-handed.
Suggestions?
0
This discussion has been closed.
Comments
you can make a check on the user ID
line 114 you can try this
if ($this->Context->Session->UserID !=5 && $Comment->AuthUserID == $this->Context->Session->UserID)
add his userid there
<?php /* Extension Name: EditRestrictions Extension Url: N/A Description: Do not allow user to edit his/her own post Version: 0.1 Author: Ziyad (MySchizoBuddy) Saeed Author Url: N/A */ $Context->SetDefinition('PERMISSION_CANNOT_EDIT_OWN_POST, 'User not allowed to edit his/her own posts'); $Context->Configuration['PERMISSION_CANNOT_EDIT_OWN_POST'] = '0'; ?>
Enable the extension
copy comments.php to a new theme folder for eg to this /path/to/vanilla/themes/theme_name/
change that line 114 to this
if (!$this->Context->Session->User->Permission('PERMISSION_CANNOT_EDIT_OWN_POST') && $Comment->AuthUserID == $this->Context->Session->UserID)
select the new theme as your default theme.
Create a new role called Douchebag and select that permission, then you can assign any user to this role.