3

Im doing my internship as a web developer in a company. we got a customer that owns a blog site that was created with joomla 3.3 . the problem is that the customer is really curious and knows nothing about computers so he is digging daily inside admin cpanel destroying things. My boss told me so to edit the joomla control panel in that way so if he log in some elements from the Admin Menu becomes invisible !

So i found out the code that creates the menu: /home/sitename/public_html/administrator/templates/isis/index.php

and the block code:

<div<?php echo ($this->params->get('admin_menus') != '0') ? ' class="nav-collapse"' : ''; ?>>
                <jdoc:include type="modules" name="menu" style="none;" />
                <ul class="nav nav-user<?php echo ($this->direction == 'rtl') ? ' pull-left' : ' pull-right'; ?>">
                    <li  class="dropdown" >

I know how to make the specific elements i want invisisble:

style="<?php if($user->name=="user10") { echo "display:none;";}?>">

but The problem is that the admin menu getting included with this : <

jdoc:include type="modules" name="menu" style="none;" />

Im searching in the file public_html/administrator/modules/ but cant find anything that match it. does anyone have any idea where it could be ??

Εdit: after loads of hours i got it, so i share it if anyone else needs it in future:

**administrator/**modules/mod_menu/menu.php ( i was searching in the frontend before :S )

echo "<li" . $class  . ">";

eddited to :

$user  = JFactory::getUser();
$tmpvar= 'style="display:none;"';
$rekt=$this->_current->title;

if(($user->name=="user10") && ( $rekt== "Content")) {
$childcounteryo=0;
}
if (($user->name=="user10") && ( $rekt == "System") || $rekt== "Extensions" || $rekt=="Help" ) {
echo "<li" . $class  . $tmpvar . ">";

}else {
echo "<li" . $class  . ">";
}

foreach ($this->_current->getChildren() as $child)
            {   
                if ($childcounteryo !=1) {
                $this->_current = & $child;
                $this->renderLevel($depth++);
                }
                $childcounteryo+=1;
            }

(in content tab wanted to remove the 2nd submenu )

4

I'm not sure which elements exactly you want to remove for your client, however what you can do is change his user group from Super Admin to Admin which will remove a lot of the default options such as the Language Manager and Global Configuration.

The good thing about Joomla is that is uses ACL (Access Control List) which allows you to choose which actions and view are available to specific user groups.

The following Joomla Documentation will guide you a lot with this:

http://docs.joomla.org/J3.x:Access_Control_List_Tutorial

Hope this helps

Update:

  1. Go to Extensions >> Extension Manager >> Manage
  2. Click Options in the top right then click the Permissions tab
  3. Select the Administrator tab on the left
  4. Set the Delete option to Denied

This will prevent the client with Administrator permissions from uninstalling extensions.

  • he was removing components and modules so i wanted to let him access only for Articles is this doable with ACL ? – IseNgaRt Nov 20 '14 at 11:57
  • @IseNgaRt - I've updated my answer – Lodder Nov 20 '14 at 12:04
  • After i spoke with my boss he wants our client has access only in articles tab and "News Show SP2" module, but cant have access to any other modules except that. so can i exclude him from every module except that specific one ? – IseNgaRt Nov 20 '14 at 12:12
  • As mentioned in mine and @FFrewin's answer, please take a look at the ACL tutorial. – Lodder Nov 20 '14 at 12:29
  • i allready did and altough i was been able to close alot of other permissions, i found out that at category tab i cant remove just the categories without removing articles also. – IseNgaRt Nov 20 '14 at 12:34
2

First of all, avoid giving Super User access to users that you can't trust. Super User has the higher privileges and can do anything on the site. See if by making the user a simple Administrator will be sufficient for what you want.

Otherwise, Joomla incorporates a deep ACL system, that will let you customize who has access on what.

Find more info here: http://docs.joomla.org/J3.x:Access_Control_List_Tutorial

However, there are even more things you can do, to create custom backend navigation and apply specific restrictions.

There are extensions that will let you do this... I recommend Admin Menu Manager & Access Manager.

  • he isnt super user. i created a chiled Administrator category named Site-Admin , so he is just a simple Administrator – IseNgaRt Nov 20 '14 at 12:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.