Commit ec63804831d1a55171abfb7fc0894af20d4298e8
1 parent
de8df1be
Exists in
master
and in
4 other branches
Made fixes suggested by @randx in pull request
See https://github.com/gitlabhq/gitlabhq/pull/3597#discussion-diff-4014638
Showing
2 changed files
with
7 additions
and
6 deletions
Show diff stats
app/models/ability.rb
@@ -60,15 +60,16 @@ class Ability | @@ -60,15 +60,16 @@ class Ability | ||
60 | :read_note, | 60 | :read_note, |
61 | :write_project, | 61 | :write_project, |
62 | :write_issue, | 62 | :write_issue, |
63 | - :write_note, | ||
64 | - :fork_project | 63 | + :write_note |
65 | ] | 64 | ] |
66 | end | 65 | end |
67 | 66 | ||
68 | def project_report_rules | 67 | def project_report_rules |
69 | project_guest_rules + [ | 68 | project_guest_rules + [ |
70 | :download_code, | 69 | :download_code, |
71 | - :write_snippet | 70 | + :write_snippet, |
71 | + :fork_project | ||
72 | + | ||
72 | ] | 73 | ] |
73 | end | 74 | end |
74 | 75 |
db/migrate/20130319214458_create_forked_project_links.rb
1 | class CreateForkedProjectLinks < ActiveRecord::Migration | 1 | class CreateForkedProjectLinks < ActiveRecord::Migration |
2 | def change | 2 | def change |
3 | create_table :forked_project_links do |t| | 3 | create_table :forked_project_links do |t| |
4 | - t.integer :forked_to_project_id, :null => false | ||
5 | - t.integer :forked_from_project_id, :null => false | 4 | + t.integer :forked_to_project_id, null: false |
5 | + t.integer :forked_from_project_id, null: false | ||
6 | 6 | ||
7 | t.timestamps | 7 | t.timestamps |
8 | end | 8 | end |
9 | - add_index :forked_project_links, :forked_to_project_id, :unique => true | 9 | + add_index :forked_project_links, :forked_to_project_id, unique: true |
10 | end | 10 | end |
11 | end | 11 | end |