Skip to content

Commit

Permalink
Fixes the permissons tests from the with updates from the underlying …
Browse files Browse the repository at this point in the history
…library.
  • Loading branch information
typhonius committed May 24, 2020
1 parent adadf7f commit fbde333
Show file tree
Hide file tree
Showing 2 changed files with 110 additions and 16 deletions.
63 changes: 55 additions & 8 deletions tests/Commands/PermissionsCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,61 @@ public function permissionsProvider()
{

$permissions = <<<LIST
+--------------------+--------------------------------------------------------------------------+
| Name | Label |
+--------------------+--------------------------------------------------------------------------+
| administer alerts | Manage Insight alerts |
| deploy to non-prod | Pull and deploy code, files, or databases to non-production environments |
| deploy to prod | Deploy code, files, or databases to the production environment |
| pull from prod | Pull files or databases from the production environment |
+--------------------+--------------------------------------------------------------------------+
+-----------------------------+--------------------------------------------------------------------------+
| Name | Label |
+-----------------------------+--------------------------------------------------------------------------+
| administer alerts | Manage Insight alerts |
| revoke insight installs | Revoke Insight sites |
| deploy to non-prod | Pull and deploy code, files, or databases to non-production environments |
| deploy to prod | Deploy code, files, or databases to the production environment |
| pull from prod | Pull files or databases from the production environment |
| move file to non-prod | Move files to non-production environments |
| move file to prod | Move files to the production environment |
| move file from prod | Move files from production environments |
| move file from non-prod | Move files from non-production environments |
| clear varnish on non-prod | Clear Varnish cache for non-production environments |
| clear varnish on prod | Clear Varnish cache for the production environment |
| configure prod env | Configure production environment |
| configure non-prod env | Configure non-production environments |
| add an environment | Add an environment |
| delete an environment | Delete an environment |
| administer domain non-prod | Add or remove domains for non-production environments |
| administer domain prod | Add or remove domains for the production environment |
| administer ssl prod | Add or remove SSL certificates for the production environment |
| administer ssl non-prod | Add or remove SSL certificates for the non-production environments |
| reboot server | Reboot server |
| resize server | Resize server |
| suspend server | Suspend server |
| configure server | Configure server |
| download logs non-prod | Download logs for non-production environments |
| download logs prod | Download logs for the production environment |
| add database | Add a database |
| remove database | Remove a database |
| view database connection | View database connection details (username, password, or hostname) |
| download db backup non-prod | Download database backups for non-production environments |
| download db backup prod | Download database backups for the production environment |
| create db backup non-prod | Create database backups for non-production environments |
| create db backup prod | Create database backups for the production environment |
| restore db backup non-prod | Restore database backups for non-production environments |
| restore db backup prod | Restore database backups for the production environment |
| administer team | Add or remove a user of a team |
| access cloud api | Access the Cloud API |
| administer cron non-prod | Modify cron tasks for non-production environments |
| administer cron prod | Modify cron tasks for the production environment |
| search limit increase | Increase the search index limit for a subscription |
| search schema edit | Edit the search schema for a subscription |
| create support ticket | Create a support ticket |
| edit any support ticket | View and edit any support tickets for a subscription |
| administer ssh keys | Manage SSH keys |
| view build plans | View Build plans |
| edit build plans | Edit Build plans |
| run build plans | Run Build plans |
| add ssh key to git | Add SSH key to git repository |
| add ssh key to non-prod | Add SSH key to non-production environments |
| add ssh key to prod | Add SSH key to the production environment |
| view remote administration | View Remote Administration |
| edit remote administration | Edit Remote Administration |
+-----------------------------+--------------------------------------------------------------------------+
LIST;

return [
Expand Down
63 changes: 55 additions & 8 deletions tests/Commands/RolesCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,61 @@ public function roleProvider()
> Team Lead: 312c0121-906b-4498-8402-7b479172768c
> Senior Developer: 5f7da0a9-9ff0-4db8-802e-9d2b9969efc2
> Developer: d33cd9ff-281d-4bcf-9f89-b10b249caa35
+--------------------+-----------+------------------+-----------+
| Permission | Team Lead | Senior Developer | Developer |
+--------------------+-----------+------------------+-----------+
| administer alerts | | | |
| deploy to non-prod | | | |
| deploy to prod | | | |
| pull from prod | | | |
+--------------------+-----------+------------------+-----------+
+-----------------------------+-----------+------------------+-----------+
| Permission | Team Lead | Senior Developer | Developer |
+-----------------------------+-----------+------------------+-----------+
| administer alerts | | | |
| revoke insight installs | | | |
| deploy to non-prod | | | |
| deploy to prod | | | |
| pull from prod | | | |
| move file to non-prod | | | |
| move file to prod | | | |
| move file from prod | | | |
| move file from non-prod | | | |
| clear varnish on non-prod | | | |
| clear varnish on prod | | | |
| configure prod env | | | |
| configure non-prod env | | | |
| add an environment | | | |
| delete an environment | | | |
| administer domain non-prod | | | |
| administer domain prod | | | |
| administer ssl prod | | | |
| administer ssl non-prod | | | |
| reboot server | | | |
| resize server | | | |
| suspend server | | | |
| configure server | | | |
| download logs non-prod | | | |
| download logs prod | | | |
| add database | | | |
| remove database | | | |
| view database connection | | | |
| download db backup non-prod | | | |
| download db backup prod | | | |
| create db backup non-prod | | | |
| create db backup prod | | | |
| restore db backup non-prod | | | |
| restore db backup prod | | | |
| administer team | ✓ | ✓ | |
| access cloud api | | ✓ | ✓ |
| administer cron non-prod | | | |
| administer cron prod | | | |
| search limit increase | | | |
| search schema edit | | | |
| create support ticket | | | |
| edit any support ticket | | | |
| administer ssh keys | | | |
| view build plans | | | |
| edit build plans | | | |
| run build plans | | | |
| add ssh key to git | | | |
| add ssh key to non-prod | | | |
| add ssh key to prod | | | |
| view remote administration | | | |
| edit remote administration | | | |
+-----------------------------+-----------+------------------+-----------+
TABLE;

return [
Expand Down

0 comments on commit fbde333

Please sign in to comment.