diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-04-04 13:36:36 +0200 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-04-04 13:36:36 +0200 |
commit | 44321b1a3d99fc1a25d4b24afef55e1755f89e8a (patch) | |
tree | b5eee1964c7f32adb8096c07cee23c2a413640eb /app/models/project.rb | |
parent | b03f1699c47ce8a08f67ef458107d22cbafbc0bd (diff) | |
parent | 5efd67942cec39d733d27a52edc2ebc86babce30 (diff) | |
download | gitlab-ce-44321b1a3d99fc1a25d4b24afef55e1755f89e8a.tar.gz |
Merge branch 'master' into feature/multi-level-container-registry-images
* master: (57 commits)
Ensure we generate unique usernames otherwise validations fail
Fix a Knapsack issue that would load support/capybara.rb before support/env.rb
Ensure users have a short username otherwise a click event is triggered ...
Enable the `bullet_logger` setting; enable `raise` in test environment
Fix Rubocop offenses
Set the right timeout for Gitlab::Shell#fetch_remote
Refactoring Projects::ImportService
Move methods that are not related to mirroring to the repository model
Fix GitHub pull request formatter spec
Rename skip_metrics to imported on the importable concern
Add CHANGELOG
Remove unused include from RepositoryImportWorker
Skip MR metrics when importing projects from GitHub
Fetch GitHub project as a mirror to get all refs at once
Make file templates easy to use and discover
Ensure user has a unique username otherwise `user10` would match `user1`
Ensure the AbuseReport fixtures create unique reported users
Don't use FFaker in factories, use sequences instead
Fix brittle specs
Fix the AbuseReport seeder
...
Conflicts:
db/schema.rb
Diffstat (limited to 'app/models/project.rb')
-rw-r--r-- | app/models/project.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/project.rb b/app/models/project.rb index 2bbfba90b6b..f36cc324a5e 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -535,6 +535,10 @@ class Project < ActiveRecord::Base import_type == 'gitea' end + def github_import? + import_type == 'github' + end + def check_limit unless creator.can_create_project? || namespace.kind == 'group' projects_limit = creator.projects_limit |