fix roles_inherited return #274

This commit is contained in:
leogermani 2019-11-11 14:57:30 -03:00
parent 5966d31f62
commit 9a2078dd19
2 changed files with 4 additions and 0 deletions

View File

@ -432,6 +432,7 @@ class REST_Roles_Controller extends REST_Controller {
'slug' => $slug,
'name' => translate_user_role($role['name']),
];
continue;
}
// inherited roles

View File

@ -238,6 +238,9 @@ class TAINACAN_REST_Roles_Controller extends TAINACAN_UnitApiTestCase {
$this->assertArrayHasKey('test', $caps['tnc_rep_edit_metadata']['roles']);
$this->assertArrayHasKey('editor', $caps['tnc_rep_edit_metadata']['roles_inherited']);
$this->assertArrayNotHasKey('editor', $caps['manage_tainacan']['roles_inherited']);
$this->assertArrayNotHasKey('administrator', $caps['manage_tainacan']['roles_inherited']);
}