Joomla 1.6 Jumi - ACL permissions on apps?

A multipurpose module, plugin and component

Joomla 1.6 Jumi - ACL permissions on apps?

New postby [email protected] » Wed Mar 02, 2011 1:37 pm

I've got Jumi installed and working pretty well in Joomla 1.6 -- I've created a little app using the Jumi Application Manager and making several separate 'apps' and then linking them together with links and redirects.

The only problem is I can't figure out how to restrict access to my Jumi-based app. I know I could create a menu item to the Jumi application, but my full application is made up of about 6 applications and I only want the first one to have a menu item link.

It looks like Jumi for 1.6 doesn't yet have the ability to set access per application directly in the component (hopefully in a future release??) -- so I'm wondering if there's a way to include it in the code of the applications directly using the Joomla API - would that be possible?

Thanks,
Scott
[email protected]
 
Posts: 2
Joined: Wed Mar 02, 2011 1:15 pm

Re: Joomla 1.6 Jumi - ACL permissions on apps?

New postby [email protected] » Wed Mar 02, 2011 2:53 pm

I kept digging and found a way to do it - so, in case anyone else is having a similar problem, I thought I'd share what I found that's working for me.

In each of the Jumi apps I added this:
Code: Select all
<?php
$coachId = $user->get('id');
jimport( 'joomla.user.helper' );
$groups = JUserHelper::getUserGroups($coachId);
?>


and further down a bit, this:
Code: Select all
<?php if(!array_key_exists("Coaching",$groups)) {
echo "<h3>Sorry, you do not have appropriate credentials to access the Online JOG Your Right Brain&trade; Application.</h3><p>Please contact a certified JOG coach for more information.</p>";
} else {
?>

...which is followed by the rest of the code for the application.

This way, if the person trying to access the app is either not logged in, or is not a member of the "Coaching" group, they will get the message that they do not have appropriate permissions to access the app.

Seems to be working well in my testing.
[email protected]
 
Posts: 2
Joined: Wed Mar 02, 2011 1:15 pm


Return to Jumi

Who is online

Users browsing this forum: Baidu [Spider] and 3 guests

cron