__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
@core @core_course @theme_boost
Feature: Role assignments can be made at the category level
In order to grant a user different capabilities
As a user
I can assign roles in categories
Background:
Given the following "users" exist:
| username | firstname | lastname |
| manager | Manager | Manager |
And the following "categories" exist:
| name | category | idnumber |
| Cat 1 | 0 | CAT1 |
And the following "role assigns" exist:
| user | role | contextlevel | reference |
| manager | manager | Category | CAT1 |
And I log in as "admin"
@javascript
Scenario: A user with a category role can assign roles
Given I define the allowed role assignments for the "Manager" role as:
| Teacher | Assignable |
And I log out
And I log in as "manager"
And I am on course index
When I follow "Cat 1"
And I navigate to "Permissions" in current page administration
Then "Assign roles" "text" should exist in the ".tertiary-navigation" "css_element"
@javascript
Scenario: A user with a category role cannot assign roles if there are no roles to assign
Given I define the allowed role assignments for the "Manager" role as:
| Manager | Not assignable |
| Course creator | Not assignable |
| Teacher | Not assignable |
| Non-editing teacher | Not assignable |
| Student | Not assignable |
And I change window size to "large"
And I log out
And I log in as "manager"
And I am on course index
When I follow "Cat 1"
And I navigate to "Permissions" in current page administration
Then "Assign roles" "text" should not exist in the ".tertiary-navigation" "css_element"
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| addblock.feature | File | 1.67 KB | 0777 |
|
| behat_theme_boost_behat_navigation.php | File | 4.25 KB | 0777 |
|
| blacklist.json | File | 483 B | 0777 |
|
| breadcrumb.feature | File | 4.39 KB | 0777 |
|
| category_role_assignment.feature | File | 1.74 KB | 0777 |
|
| contextmenu.feature | File | 1.06 KB | 0777 |
|
| course_reuse.feature | File | 2.05 KB | 0777 |
|
| formerrors.feature | File | 1.08 KB | 0777 |
|
| languagemenu.feature | File | 3.87 KB | 0777 |
|
| mycoursesblocks.feature | File | 1.42 KB | 0777 |
|
| primarynav.feature | File | 5.56 KB | 0777 |
|
| regionmainsettingsmenu.feature | File | 1.21 KB | 0777 |
|
| reset_tour.feature | File | 1.18 KB | 0777 |
|
| settingstabs.feature | File | 948 B | 0777 |
|
| theme_selector.feature | File | 1.4 KB | 0777 |
|
| tour_filter.feature | File | 2.01 KB | 0777 |
|
| welcome_to_moodle.feature | File | 1.54 KB | 0777 |
|