Tab on Entry Forms Not Displaying for Custom Member Groups
Posted: 01 April 2008 07:54 AM   [ Ignore ]
Newbie
Rank
Total Posts:  9
Joined  2006-08-17

Hi again,

So we have a custom member group set up for content admins. Basically, they have access to just about everything except templates. The User Authors tab doesn’t display for them however. I logged in with one of their accounts to verify this. The member group has access to all Modules (including User). I can even browse to the Extensions manager under their account and see that the tab titles are in place (the problem I had yesterday).

Any suggestions? The tab seems to only be available to Super Admins.

Thanks!

Phil

 Signature 

Phil Hertzler
TDC Design | Richmond VA

Profile
 
 
Posted: 01 April 2008 08:24 AM   [ Ignore ]   [ # 1 ]
Newbie
Rank
Total Posts:  20
Joined  2008-03-31

Looks like this is where the problem is (around line 335 in ext.user_authors_ext.php)…

/** ----------------------------------------
/** Check group permission
/** ----------------------------------------*/

  if ( $SESS->userdata('group_id') != '1' )
  
{
   $query
= $DB->query( "SELECT COUNT(*) AS count FROM exp_module_member_groups mg LEFT JOIN exp_modules m ON
m.module_id = mg.module_id WHERE m.module_name = 'Simple_commerce' AND mg.group_id = '"
.$DB->escape_str(
$SESS->userdata('group_id') )."'" );

   if (
$query->row['count'] == 0 )
   
{
return FALSE;
   
}
  }

The extension is checking for Simple commerce module access if the user is not a Super Admin to decide whether or not to show the user author tab on the entry form.

I changed m.module_name = ‘Simple_commerce’ to m.module_name = ‘User’ and it worked.

 Signature 

Mike Dupre
TDC Design | Richmond VA

Profile
 
 
Posted: 01 April 2008 09:06 AM   [ Ignore ]   [ # 2 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  702
Joined  2004-03-30

Thanks Mike,

PHP 5.0 is case sensitive in this regard and our code was for PHP 4.0.

PieMan, this needs to go on our list.

mk

 Signature 

Mitchell Kimbrough

Profile
 
 
Posted: 01 April 2008 11:13 AM   [ Ignore ]   [ # 3 ]
Newbie
Rank
Total Posts:  20
Joined  2008-03-31

No problem, thanks for all the great work on this module and extension!

 Signature 

Mike Dupre
TDC Design | Richmond VA

Profile