Skip to content

Commit

Permalink
MDL-73178 roles: show both role names in permission table.
Browse files Browse the repository at this point in the history
  • Loading branch information
paulholden committed Jan 14, 2022
1 parent 0e18847 commit 20b8a47
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion admin/roles/classes/permissions_table.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function __construct($context, $contextname, $allowoverrides, $allowsafeo
$this->overridableroles = $overridableroles;

$roles = get_all_roles($context);
$this->roles = role_fix_names(array_reverse($roles, true), $context, ROLENAME_ALIAS, true);
$this->roles = role_fix_names(array_reverse($roles, true), $context, ROLENAME_BOTH, true);

}

Expand Down
12 changes: 6 additions & 6 deletions admin/tool/behat/tests/behat/edit_permissions.feature
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@ Feature: Edit capabilities
And I should see "Teacher < \"editing\" (Non-editing teacher)" in the "Teaching Assistant" "table_row"
And I should see "Studier & 'learner' (Student)" in the "Student One" "table_row"
And I am on the "C1" "permissions" page
And I should see "Teacher >= editing" in the "mod/forum:replypost" "table_row"
And I should see "Teacher < \"editing\"" in the "mod/forum:replypost" "table_row"
And I should see "Studier & 'learner'" in the "mod/forum:replypost" "table_row"
And I should see "Teacher >= editing (Teacher)" in the "mod/forum:replypost" "table_row"
And I should see "Teacher < \"editing\" (Non-editing teacher)" in the "mod/forum:replypost" "table_row"
And I should see "Studier & 'learner' (Student)" in the "mod/forum:replypost" "table_row"
And I follow "Prohibit"
And "Teacher >= editing" "button" in the "Prohibit role" "dialogue" should be visible
And "Teacher < \"editing\"" "button" in the "Prohibit role" "dialogue" should be visible
And "Studier & 'learner'" "button" in the "Prohibit role" "dialogue" should be visible
And "Teacher >= editing (Teacher)" "button" in the "Prohibit role" "dialogue" should be visible
And "Teacher < \"editing\" (Non-editing teacher)" "button" in the "Prohibit role" "dialogue" should be visible
And "Studier & 'learner' (Student)" "button" in the "Prohibit role" "dialogue" should be visible

0 comments on commit 20b8a47

Please sign in to comment.