Content
View differences
Updated by Wieland Lindenthal almost 4 years ago
### Steps to reproduce
Manually run the following command in the ruby console:
`::Migration::MigrationUtils::PermissionAdder.add(:view_work_packages, :view_file_links)`
### What is the buggy behavior?
The `PermissionAdd.add` PermissionAdd.add() will create a new set `view_file_links` 'view\_file\_links' permission for all roles that have the `view_work_packages` view\_work\_packages permission. Running `PermissionAdd.add` PermissionAdd.add() multiple times will result in multiple copies of the same record in the `role_permissions` role\_permissions table.
### What is the expected behavior?
`PermissionAdd.add` PermissionAdd.add() should add a new permission when run for the first time. Running it again should not add additional rows in table `role_permissions`. role\_permissions.
### OpenProject Version
Running with 12.1 DEV (2022-07-15)
Manually run the following command in the ruby console:
`::Migration::MigrationUtils::PermissionAdder.add(:view_work_packages, :view_file_links)`
### What is the buggy behavior?
The `PermissionAdd.add`
### What is the expected behavior?
`PermissionAdd.add`
### OpenProject Version
Running with 12.1 DEV (2022-07-15)