I have been through the file /lib/blocklib.php
The condition for the Permission link to appear in the menu was this:
if (get_assignable_roles($block->context, ROLENAME_SHORT)) {
$rolesurl = new moodle_url('/admin/roles/assign.php', array('contextid' => $block->context->id));
$str = new lang_string('assignrolesinblock', 'block', $blocktitle);
$icon = 'i/assignroles';
} else if (has_capability('moodle/role:review', $block->context) or get_overridable_roles($block->context)) {
$rolesurl = new moodle_url('/admin/roles/permissions.php', array('contextid' => $block->context->id));
$str = get_string('permissions', 'role');
$icon = 'i/permissions';
} else if (has_any_capability(array('moodle/role:safeoverride', 'moodle/role:override', 'moodle/role:assign'), $block->context)) {
$rolesurl = new moodle_url('/admin/roles/check.php', array('contextid' => $block->context->id));
$str = get_string('checkpermissions', 'role');
$icon = 'i/checkpermissions';
}
can anyone please help me with the functionality of
get_overridable_roles($block->context))
FYI: I have cloned couple of roles with archtype teacher and manager.
Thanks
Hameed