Closed (fixed)
Project:
Affiliates
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Reporter:
Created:
21 Mar 2009 at 05:07 UTC
Updated:
21 Apr 2009 at 16:10 UTC
Jump to comment: Most recent
I think we need to add a new permission item to the module. Specifically, ones that controls access to the /affiliates page and blocks. Right now, we have permissions for clicks and for admin, but no specific control of what role can see the buttons & banners page. Currently they uses the system 'access content' value.
The click, btw, is also using 'access content' instead of the 'affiliate click' value. Not sure why.
The changes (suggesting a name for the new perm here):
function affiliates_perm() {
return array('administer affiliates', 'affiliate click', 'affiliate view');
}
and
$items['aff'] = array(
'page callback' => 'affiliates_click',
'access arguments' => array('affiliate click'),
'type' => MENU_HIDE,
);
$items['affiliates/top_users'] = array(
'title' => t('Top Affiliates'),
'page callback' => 'affiliates_top_users',
'access arguments' => array('affiliate view'),
'type' => MENU_HIDE,
);
$items['affiliates/top_climbers'] = array(
'title' => t('Top Affiliate Climbers'),
'page callback' => 'affiliates_top_climbers',
'access arguments' => array('affiliate view'),
'type' => MENU_HIDE,
);
$items['affiliates'] = array(
'title' => t('Affiliates Home'),
'page callback' => 'affiliates_list',
'access arguments' => array('affiliate view'),
);
Comments
Comment #1
Anonymous (not verified) commentedComment #2
Anonymous (not verified) commentedImplemented.
I'll get this committed to the development branch later today.
Best, Paul