Can "EditOwn" permission work only for unpublished articles? - Joomla! Forum - community, help and support


hi!
i have set users can create articles through backend article manager , specific category. allowed permissions these users specific category create , edit own.
however, once manager publishes articles, can still use backend , edit them. if set edit own denied, cannot edit published articles, unfortunately cannot edit them while unpublished.
i believe joomla core permissions can't need, there files can "hack" make edit own permission use article state (published/unpublished)? average programmer , have no idea joomla code.

ok, have managed "hack" 2 files , got working. this v3.3.6 , hack backend, default isis administrative template, case described , gone each joomla update.

administrator\components\com_content\views\articles\tmpl\default.php
change line 119 from

code: select all

$caneditown = $user->authorise('core.edit.own',   'com_content.article.'.$item->id) && $item->created_by == $userid;

to

code: select all

$caneditown = $user->authorise('core.edit.own',   'com_content.article.'.$item->id) && $item->created_by == $userid && $item->state == 0;


and

administrator\components\com_content\controllers\article.php

change line 115 from

code: select all

return true;

to

code: select all

return $this->getmodel()->getitem($recordid)->state == 0;





Comments

Popular posts from this blog

Warning, the Safe Path is not accessible vm3 - Joomla! Forum - community, help and support

uppercase letters in url - Joomla! Forum - community, help and support

Joomla! Update is not offering Joomla 3 - Joomla! Forum - community, help and support