MDL-50666 core: Add function get_viewable_roles to set role visibility
This commit is contained in:
committed by
Jun Pataleta
parent
95b7be7f05
commit
a63cd3e2ca
@@ -789,9 +789,9 @@ EOD;
|
||||
|
||||
if ($record['archetype']) {
|
||||
|
||||
// We copy all the roles the archetype can assign, override and switch to.
|
||||
// We copy all the roles the archetype can assign, override, switch to and view.
|
||||
if ($record['archetype']) {
|
||||
$types = array('assign', 'override', 'switch');
|
||||
$types = array('assign', 'override', 'switch', 'view');
|
||||
foreach ($types as $type) {
|
||||
$rolestocopy = get_default_role_archetype_allows($type, $record['archetype']);
|
||||
foreach ($rolestocopy as $tocopy) {
|
||||
|
||||
Reference in New Issue
Block a user