new permissions?
fred0 - March 21, 2009 - 05:07
| Project: | Affiliates |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | paulbooker |
| Status: | closed |
Jump to:
Description
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'),
);
#1
#2
Implemented.
I'll get this committed to the development branch later today.
Best, Paul
#3
Automatically closed -- issue fixed for 2 weeks with no activity.