Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SDPAP-8375]granted permissions to approvers to create and edit department/sites #453

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions tests/behat/features/access.feature
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,9 @@ Feature: Access permissions
Given I am logged in as a user with the "Site Auditor" role
When I go to "/admin/reports/audit-trail"
Then I should get a 200 HTTP response

@api
Scenario: Approver role should not have access to redirects.
Given I am logged in as a user with the "approver" role
When I go to "admin/structure/taxonomy/add"
Then I should get a 404 HTTP response
15 changes: 15 additions & 0 deletions tide_core.install
Original file line number Diff line number Diff line change
Expand Up @@ -124,3 +124,18 @@ function tide_core_update_10003() {
$config->save();
}
}

/**
* Approver should not have access to administer taxonomy.
*/
function tide_core_update_10004() {
$role = 'approver';
$permissions = [
'administer taxonomy',
'edit terms in topic',
'delete terms in topic',
];
if ($role) {
user_role_revoke_permissions($role, $permissions);
}
}
Loading