Monday 08 September 2003 9:48:37 pm
I ended up importing the policies for content, read with the following code (from index.php)
// Import the permissions for the content module as that these can be honoured
include_once( "kernel/classes/datatypes/ezuser/ezuser.php" );
$currentUser =& eZUser::currentUser();
$accessResult = $currentUser->hasAccessTo( 'content' , 'read' );
$params['Limitation'] =& $accessResult['policies'];
$GLOBALS['ezpolicylimitation_list'] =& $params['Limitation'];
$limitationList = array();
if ( isset( $GLOBALS['ezpolicylimitation_list'] ) )
{
$policyList =& $GLOBALS['ezpolicylimitation_list'];
$limitationList = array();
foreach( array_keys( $policyList ) as $key )
{
$policy =& $policyList[$key];
$limitationList[] =& $policy->attribute( 'limitations' );
} }
Cheers Bruce
My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish
|