Joomla Content Access Restriction by Author

Joomla CMS Content Access Restriction by Author

How to Create Joomla Content Access Restriction?

If you have website and:
You have many authors assigned to different articles.
You would like to restrict access to other author’s articles.

Submitted by Olga Shuvalova.
Cопоставлять для коментирования надо только следующие строки:

        //administrator/components/com_content/admin.content.php
//Надо закомментировать строки 181,182,183
// if ( $filter_authorid > 0 ) {
// $where[] = "c.created_by = " . (int) $filter_authorid;
//$cid = josGetArrayInts( 'cid' );
//}
После закоментированных строк надо вставить фрагмент:
if($_SESSION['session_usertype']=="Super Administrator")
{
if ( $filter_authorid > 0 ) {
$where[] = "c.created_by = " . (int) $filter_authorid;
}
}
else
{
$cid=$_SESSION['session_user_id'];
$where[] = "c.created_by = " . (int) $cid;
}