Spice up your Joomla and Mambo website with 2 great extensions!
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

38931 Posts in 10542 Topics by 27629 Members
Latest Member: VL
JoomlaWorks Community ForumTutorials contributed by usersFor Joomla! 1.0.xGive Joomla backend managers access to any component! Control who has access!
Pages: 1 [2]   Go Down
  Print  
Author Topic: Give Joomla backend managers access to any component! Control who has access!  (Read 78365 times)
0 Members and 1 Guest are viewing this topic.
Fotis
JoomlaWorks Team / Forum Administrator
Administrator
Hero Member
*****
Offline Offline

Posts: 3966


K2 wins "Joomla! component of 2010" at J & Beyond!


View Profile WWW
« Reply #20 on: February 22, 2008, 09:33:51 PM »

@jetronic
The solution to what you ask is right above your post.
http://forum.joomlaworks.gr/index.php?topic=1119.msg11614#msg11614

@timgerr
Groups can only be created using a 3PD component like JACL (which we recommend as STEP 2, if you want more control over permissions).

@MokumDesign
Thanks for your kind words. Wink
Logged

Frontpage Slideshow! The uber slideshow system for Joomla! & other PHP based sites by JoomlaWorks

Thinking of blogging with Joomla? Try SuperBlogger!

BREAKING NEWS! K2 has won the "Joomla! component of 2010" award at J and Beyond 2010, the international Joomla! event
Dysier
Newbie
*
Offline Offline

Posts: 3


View Profile
« Reply #21 on: February 26, 2008, 05:57:30 PM »

Great tutorial.  Thanks!

Following the tutorial I was able to successfully grant managers access to community builder.  I would also like to do the same with AEC subscription component.  However, even know the managers have access to the component, they get the following message "You are not authorized to view this resource", along with no editing access. 

Is there something in addition to what's already been pointed out in the tutorial that I would need to set in the gacl file for cases such as this?

Thanks.
Logged

Signatures appear only for members with more than 10 posts
kavin
Newbie
*
Offline Offline

Posts: 1


View Profile
« Reply #22 on: February 29, 2008, 07:22:14 AM »

Well, Fortis, your tips are very helpful and thank you very much, but there is one more thing that I need to fix is

After I hided all access menu to the manager except the Virtuemart component which I have to let them manage the prodcut, but if I place this url "http://sitename/administrator/index2.php?option=com_installer&element=component" Manger will be able to access the installer, is there any way to prevent this serious menu and installation to manager?
Logged

Signatures appear only for members with more than 10 posts
Fotis
JoomlaWorks Team / Forum Administrator
Administrator
Hero Member
*****
Offline Offline

Posts: 3966


K2 wins "Joomla! component of 2010" at J & Beyond!


View Profile WWW
« Reply #23 on: March 14, 2008, 12:17:05 AM »

If I remember correctly, even if "managers" access com_installer, they can't perform any actions.  Wink
Logged

Frontpage Slideshow! The uber slideshow system for Joomla! & other PHP based sites by JoomlaWorks

Thinking of blogging with Joomla? Try SuperBlogger!

BREAKING NEWS! K2 has won the "Joomla! component of 2010" award at J and Beyond 2010, the international Joomla! event
whiteknight
Newbie
*
Offline Offline

Posts: 4


View Profile
« Reply #24 on: November 01, 2008, 07:33:37 PM »

To restrict access to parts of the joomla backend menu, the easiest way is to hide these links from certain groups.

To restrict accessing a component by typing the URL in the browser address field by backend users without the appropriate permission, I found this hack to be working. The downside is, that you must do it for each component you want to restrict.

After the famous

Code:
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );

in file administrator/components/com_yourcomponent/admin.com_yourcomponent.php

place following codesnippet:

Code:
if (!($acl->acl_check( 'administration', 'edit', 'users', $my->usertype, 'components', 'all' )
        | $acl->acl_check( 'administration', 'edit', 'users', $my->usertype, 'components', 'com_yourcomponent' ))) {
        mosRedirect( 'index2.php', _NOT_AUTH );
}


So for com_jwmmxtd (the JW Media Manager XTD) it is:
Code:
if (!($acl->acl_check( 'administration', 'edit', 'users', $my->usertype, 'components', 'all' )
        | $acl->acl_check( 'administration', 'edit', 'users', $my->usertype, 'components', 'com_jwmmxtd' ))) {
        mosRedirect( 'index2.php', _NOT_AUTH );
}


In theory this should be done by joomla core even before the component code is loaded to avoid useless loading of never used code in a request?
Logged

Signatures appear only for members with more than 10 posts
vice
Newbie
*
Offline Offline

Posts: 1


View Profile Email
« Reply #25 on: January 13, 2009, 01:53:35 AM »

Hello guys just wondering if this tutorial is working with joomla 1.5
Logged

Signatures appear only for members with more than 10 posts
Katia
Global Moderator
Hero Member
*****
Offline Offline

Posts: 3458


1st of May is not just a day off


View Profile WWW
« Reply #26 on: January 13, 2009, 01:53:18 PM »

This tutorial is for Joomla 1.0 but soon there will be a relevant update for Joomla 1.5 too!
Logged

JoomlaWorks Support Team

IMPORTANT NOTE: Please search before posting a question!
mtaras
Jr. Member
**
Offline Offline

Posts: 27


View Profile
« Reply #27 on: January 22, 2009, 01:49:32 PM »

It will be useful if there is update for 1.5

Thanks.
Logged

Signatures appear only for members with more than 10 posts
techboi
Newbie
*
Offline Offline

Posts: 1


View Profile
« Reply #28 on: March 19, 2009, 12:57:03 AM »

@Fotis & Katia,

Great work with everything guys, Joomla and this article... Just wondering if there has been any progress into a simillar solution for 1.5.x? I'm sorry if I sound impatient, but last time anyone else asked was back in January :-p

Thanks so much in advance,
Thar.
Logged

Signatures appear only for members with more than 10 posts
tr2n
Newbie
*
Offline Offline

Posts: 1


My final solution: justice an death.


View Profile
« Reply #29 on: April 14, 2009, 06:48:56 PM »

Hello all, it has been some time, have anyone found a solution for joomla 1.5.x?

Thanks! Cool
Logged

Signatures appear only for members with more than 10 posts
crony
Newbie
*
Offline Offline

Posts: 4


View Profile Email
« Reply #30 on: April 20, 2009, 05:52:22 PM »

The guy who'll explain that will be a hero, and get 10 virgins when hel'll died... Grin
Logged

Signatures appear only for members with more than 10 posts
Fotis
JoomlaWorks Team / Forum Administrator
Administrator
Hero Member
*****
Offline Offline

Posts: 3966


K2 wins "Joomla! component of 2010" at J & Beyond!


View Profile WWW
« Reply #31 on: April 23, 2009, 05:26:30 AM »

In Joomla! 1.5.x - locate libraries/joomla/user/authorization.php

The edit the code like you would in Joomla! 1.0.x - quite simple Smiley

Now what would I do 10 virgin if I died?  Cheesy
Logged

Frontpage Slideshow! The uber slideshow system for Joomla! & other PHP based sites by JoomlaWorks

Thinking of blogging with Joomla? Try SuperBlogger!

BREAKING NEWS! K2 has won the "Joomla! component of 2010" award at J and Beyond 2010, the international Joomla! event
crony
Newbie
*
Offline Offline

Posts: 4


View Profile Email
« Reply #32 on: April 23, 2009, 12:53:29 PM »

Well, let's see what you wouldn't do anymore if you die...  Wink

You pointed the very right file ! Thanks !!!!

Needs some polishing, but after reading carefully the thread for modules, and for others component, it should be good !

Logged

Signatures appear only for members with more than 10 posts
crony
Newbie
*
Offline Offline

Posts: 4


View Profile Email
« Reply #33 on: April 23, 2009, 01:26:42 PM »

Ok, I just need to get the syntax for adding some component that does not work directly with manager rights...
For example SH404Sef...

I tried to add this, but did not work...

Code:
$this->addACL( 'com_sh404sef', 'manage', 'users', 'manager' );
$this->addACL( 'com_sh404sef', 'edit', 'users', 'manager' );

Do you know what should it be ?
Might be more a SH404Sef problem related...Posted here:
http://extensions.siliana.com/forums/index.php?topic=11802.0

I couldn't make diseapear the "site" menu completely as well, I couldn't setup into tools reading and sending mails (massmail is functionning...)
Tried but failed on:

Code:
$this->addACL( 'com_messages', 'add', 'users', 'manager' );
$this->addACL( 'com_messages', 'manage', 'users', 'manager' );
$this->addACL( 'com_messages', 'edit', 'users', 'manager' );

any clue ? (and then it will be perfect Smiley )
« Last Edit: April 23, 2009, 02:25:17 PM by crony » Logged

Signatures appear only for members with more than 10 posts
Fotis
JoomlaWorks Team / Forum Administrator
Administrator
Hero Member
*****
Offline Offline

Posts: 3966


K2 wins "Joomla! component of 2010" at J & Beyond!


View Profile WWW
« Reply #34 on: April 23, 2009, 04:08:27 PM »

Don't forget that some component do some internal permission checkings as well. So even if you enable the menu item for the component for managers, it does not necessarily mean it will actually function. Wink

Perhaps sh404sef does that.
Logged

Frontpage Slideshow! The uber slideshow system for Joomla! & other PHP based sites by JoomlaWorks

Thinking of blogging with Joomla? Try SuperBlogger!

BREAKING NEWS! K2 has won the "Joomla! component of 2010" award at J and Beyond 2010, the international Joomla! event
crony
Newbie
*
Offline Offline

Posts: 4


View Profile Email
« Reply #35 on: May 03, 2009, 08:13:46 PM »

Hey Fotis !

Thanks, and you must be right, but it's a bit hard to know where to get this info...

I've created a post here :
http://extensions.siliana.com/forums/index.php?topic=11850.0

Found this usefull too:
http://api.joomla.org/Joomla-Framework/User/JAuthorization.html
« Last Edit: May 03, 2009, 08:59:51 PM by crony » Logged

Signatures appear only for members with more than 10 posts
hasanur
Newbie
*
Offline Offline

Posts: 1


View Profile Email
« Reply #36 on: May 25, 2009, 02:56:40 PM »

Hello Fotis,

thanks a lot for all your support. I have gone through your all post here and that helped me a lot.

I am facing one problem that have built a component for joomla 1.5.10 but cannot put restriction for users there. I want not to view Publish, Unpublish button for the manager and no new button for administrator but all for super administrator.

I want to make plugin for this but at first I tried to put direct code into authorize.php to see if this code works but did not, like the following code ..

$acl =& JFactory::getACL();
$acl->_mos_add_acl('com_edatacontrol', 'manage', 'users', 'super administrator');

from where I was expecting not to have manage access to the com_edatacontrol component other than super administrator but that did not work.

In the joomla core acl i can see permission given to joomla core components, modules but when I am creating any component that did not require anything to give access to that component.. why ?

thanks. waiting for your kind reply when you have time.
Logged

Signatures appear only for members with more than 10 posts
markgraham
Newbie
*
Offline Offline

Posts: 1


View Profile Email
« Reply #37 on: September 03, 2009, 04:33:51 PM »

Hello
I have found this thread very usefull but am stuck on something.
I would like to give the managers group level access to com_users, I have done this in user/authorization.php (joomla 1.5):
$this->addACL( 'com_users', 'manage', 'users', 'manager' );

Now the users appear in the admin area. BUT I'd like the managers to be able to edit the users and usergroups etc in the K2 component area. I can search and replace
if ($user->gid > 23) for gid > 22, then the links appear but I always get a 403 error when I try to access the k2users.

Can anyone help?
Thanks
Mark Graham
Logged

Signatures appear only for members with more than 10 posts
rpt
Newbie
*
Offline Offline

Posts: 1


View Profile Email
« Reply #38 on: October 10, 2009, 10:57:13 AM »

Hi Fotis and all,

Just wondered if there was any kind of solution for Joomla 1.5 where you can manually LIMIT particular components from being viewed by a user group, using this hack? This would mean that you can set managers to e.g. view ALL components (hence they get the Components menu in the backend) but then you would put in some kind of code line to HIDE the components you did NOT want them to view. EG something like -

$this->addACL( 'com_components', 'manage', 'users', 'manager' );
$this->hideACL( 'com_jce', 'manage', 'users', 'manager' );

- would show all components but hide JCE from the manager.

I need to say I am not a programmer so have no idea if this would easy or hard - but such a function would give the us FULL control over what appears in these backend menus for different access levels. Though it was worth asking.

Regards.
« Last Edit: October 11, 2009, 02:01:01 AM by rpt » Logged

Signatures appear only for members with more than 10 posts
Pages: 1 [2]   Go Up
  Print  
 
Jump to: