Hi there,
I've created a block which works fine but I want it only available based on a capability. I've set up the capability in <<myblock>>/db/access.php
$capabilities = array(
'block/<<myblock>>:useblock' => array(
'captype' => 'read',
'contextlevel' => CONTEXT_SYSTEM,
'archetypes' => array(
'teacher' => CAP_ALLOW,
'editingteacher' => CAP_ALLOW,
'manager' => CAP_ALLOW
)
),
);
However I'm confused as to how I check that the user has that capability before displaying the block. If anyone could point me in the right direction I'd be grateful.
Cheers
Dave