Default permission for custom role

Default permission for custom role

Akinsaya Delamarre - келді
Number of replies: 2
Hello,

I have a block that adds a new role and two new capabilities. In my access.php I define the default permissions for the legacy roles. However, I would like to assign default permissions for the new custom role in the access.php.

How would one go about doing so?

example:

$block_<name>_capabilities = array (
'riskbitmast' => <bit_mask>,
'captype' => <type>,
'contextlevel' => <level>,
'legacy' => array (
'guest' => CAP_INHERIT,
'student' => CAP_INHERIT,
'teacher' => CAP_INHERIT,
'editingteacher' => CAP_INHERIT,
'coursecreator' => CAP_INHERIT,
'admin' => CAP_ALLOW,
),
<?What_Next?>
);

Thanks,

In reply to Akinsaya Delamarre

Re: Default permission for custom role

Vy-Shane Sin Fat - келді
It can't be done in access.php. Why does the block need to define a new custom role?