GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Pull Request — master (#848)
by Ahmad
03:48
created

AddManageRoomRecordingsToPermissions.change()   A

Complexity

Conditions 1

Size

Total Lines 15

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
cc 1
dl 0
loc 15
rs 9.65
c 1
b 1
f 0
1
class MigrationProduct < ActiveRecord::Base
2
  self.table_name = :roles
3
end
4
5
class SubMigrationProduct < ActiveRecord::Base
6
  self.table_name = :role_permissions
7
end
8
9
class AddManageRoomRecordingsToPermissions < ActiveRecord::Migration[5.2]
10
  def change
11
    reversible do |dir|
12
      dir.up do
13
        MigrationProduct.all.each do |role|
14
          SubMigrationProduct.create(role_id: role.id, name: "can_manage_rooms_recordings", value: SubMigrationProduct.find_by(role_id: role.id, name: "can_manage_users").value, enabled: true)
15
        end
16
      end
17
18
      dir.down do
19
        MigrationProduct.all.each do |role|
20
          SubMigrationProduct.find_by(role_id: role.id, name: "can_manage_rooms_recordings").destroy
21
        end
22
      end
23
    end
24
  end
25
end
26