summaryrefslogtreecommitdiff
path: root/app/models/project.rb
Commit message (Collapse)AuthorAgeFilesLines
* Add `reference_pattern` to Referable modelsRobert Speicher2015-05-261-0/+5
|
* Add `to_reference` for models that support referencesRobert Speicher2015-05-261-2/+7
| | | | | Now there is a single source of information for which attribute a model uses to be referenced, and its special character.
* Merge branch 'fix-avatar-removal' into 'master'Hannes Rosenögger2015-05-121-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | Fix bug where avatar filenames were not actually deleted from the database during removal This would result in a 404 error in certain views. The `save` call was being rolled back due to an error in the validation step. Relax the validation step so that this works. Closes #1570 See merge request !620
| * Fix bug where avatar filenames were not actually deleted from the database ↵Stan Hu2015-05-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | during removal. This would result in a 404 error in certain views. The `save` call was being rolled back due to an error in the validation step. Relax the validation step so that this works. Closes #1570
* | Added X-GitLab-Event header for web hooksbugagazavr2015-05-081-1/+1
|/
* Improve/add specs for `Project#get_issue` and `#issue_exists?`rs-more-pipeline-filtersRobert Speicher2015-05-011-1/+1
|
* Change `external_issue_tracker.blank?` to `!external_issue_tracker`Robert Speicher2015-04-301-1/+1
|
* Add Project#get_issueRobert Speicher2015-04-301-8/+8
|
* Revert "Added X-GitLab-Event header for web hooks"Valery Sizov2015-04-271-1/+1
| | | | This reverts commit 548f182814acd0f7a110e6c165c186e345901b00.
* Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ceDmitriy Zaporozhets2015-04-271-4/+14
|\
| * Use Projects::CreateService to fork projects so that after-create hooks are run.forked-eventDouwe Maan2015-04-241-4/+14
| |
* | Added X-GitLab-Event header for web hooksbugagazavr2015-04-251-1/+1
|/
* Use project.commit convenience method.Douwe Maan2015-04-241-1/+1
|
* Let commit model know about its project.Douwe Maan2015-04-241-1/+5
|
* Move import data out of project so it doesn't take ages to load.Douwe Maan2015-04-171-5/+3
|
* Merge branch 'google-code-import' into 'master'Douwe Maan2015-04-151-0/+9
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Import projects from Google Code. Resolves #1257. Issue import logic almost entirely taken from https://gitlab.com/o9000/google-code-to-gitlab ( :hearts: @o9000). ### To do - [x] List projects from Google Takeout file - [x] Import Git repository - [x] Import issues - [x] Link to correct attachment URL (https://code.google.com/p/support-tools/issues/detail?id=50) - [x] Handle deleted attachments - [x] Handle blockedOn attribute - [x] Add directions on how to get data from Google Takeout ### Import instructions ![Screen_Shot_2015-04-03_at_16.02.21](https://gitlab.com/gitlab-org/gitlab-ce/uploads/4a87038035fbad9441cf613b8cdcc690/Screen_Shot_2015-04-03_at_16.02.21.png) ### Imported issue ![Screen_Shot_2015-04-03_at_16.25.49](https://gitlab.com/gitlab-org/gitlab-ce/uploads/b2c2eaf5ecfcf57b3c48511eb5d26db4/Screen_Shot_2015-04-03_at_16.25.49.png) See merge request !471
| * Allow projects to be imported from Google Code.Douwe Maan2015-04-031-0/+9
| |
* | Merge branch 'arbitrary-local-repo-import' into 'master'Dmitriy Zaporozhets2015-04-121-1/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | Prevent arbitary local repos from being imported. Fixes gitlab/gitlab-ee#263. See merge request !1763
| * | Fix project import URL regex to prevent arbitary local repos from being ↵Douwe Maan2015-04-111-1/+1
| |/ | | | | | | imported.
* | Rename last uses of Buildbox to BuildkiteRobert Speicher2015-04-111-1/+1
|/
* Use more specific regexes.Douwe Maan2015-03-271-3/+3
|
* Fix external wiki serviceDmitriy Zaporozhets2015-03-171-1/+1
|
* Merge branch 'external_wiki' into 'master'Dmitriy Zaporozhets2015-03-181-0/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for external wikis ## What does this MR do? This MR adds the possibility to replace the link to the internal wiki of gitlab with a custom link. Currently this is realised as a service. ## What Use Case does this MR solve? In my Company we already have a wiki System (Confluence). We have a policy to use the existing wiki, so we can't switch to the internal wiki Gitlab provides. This currently only leaves us two choices: 1. Disable the gitlab wiki. That means we completly loose the connection between wiki and code from the gitlab ui. 2. Create a simple wiki page with a link to our external wiki and hope that no one uses the internal one. Both solutions are not really good. So what can be done to improve the situation while making it as easy as possible for new developers to access both, wiki and gitlab? Replacing the wiki link kinda like the JIRA integration replaces the issues link looks like a good first step to me. :) This can probably be extended later to completly prevent access to the internal wiki (currently that's still possible if you know the link) or maybe to check if the link really points to a wiki. ## Screenshot: ![external_wiki_service](https://gitlab.com/uploads/gitlab-org/gitlab-ce/89b27cf068/external_wiki_service.png) See merge request !291
| * Add a service to support external wikisHannes Rosenögger2015-03-121-0/+1
| |
* | Merge branch 'fix-restricted-visibility' into 'master'Dmitriy Zaporozhets2015-03-161-3/+0
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Restricted visibility levels - bug fix and new feature This allows admin users to override restricted visibility settings when creating and updating projects and snippets, and moves the restricted visibility configuration from gitlab.yml to the web UI. See #1903. ## Move configuration location I added a new section to the application settings page for restricted visibility levels. Each level has a checkbox, styled with Bootstrap to look like a toggle button. A checked box means that the level is restricted. I added a glowing text shadow and changed the background color for checked buttons because the default styles made it hard to distinguish between checked and unchecked. This image shows the new section with the "Public" box checked: ![restricted_visibility_settings](https://dev.gitlab.org/Okada/gitlabhq/uploads/629562e4313f89b795e81c3bb0f95893/restricted_visibility_settings.png) ## Allow admins to override To allow admin users to override the restricted visibility levels, I had to remove the `visibility_level` validation from the `Project` class. The model doesn't know about the `current_user`, which should determine whether the restrictions can be overridden. We could use the creator in the validation, but that wouldn't work correctly for projects where a non-admin user is the creator and an admin tries to change the project to a restricted visibility level. The `Project::UpdateService` and `Project::CreateService` classes already had code to determine whether the current user is allowed to use a given visibility level; now all visibility level validation is done in those classes. Currently, when a non-admin tries to create or update a project using a restricted level, these classes silently set the visibility level to the global default (create) or the project's existing value (update). I changed this behavior to be more like an Active Model validation, where using a restricted level causes the entire request to be rejected. Project and personal snippets didn't have service classes, and restricted visibility levels weren't being enforced in the model or the controllers. The UI disabled radio buttons for restricted levels, but that wouldn't be difficult to circumvent. I created the `CreateSnippetService` and `UpdateSnippetService` classes to do the same restricted visibility check that the project classes do. And since I was dealing with snippet visibility levels, I updated the API endpoints for project snippets to allow users to set and update the visibility level. ## TODO * [x] Add more tests for restricted visibility functionality cc @sytse @dzaporozhets See merge request !1655
| * | Allow admins to override restricted visibilityVinnie Okada2015-03-081-5/+0
| | | | | | | | | | | | | | | Allow admins to use restricted visibility levels when creating or updating projects.
| * | Move restricted visibility settings to the UIVinnie Okada2015-03-071-2/+4
| |/ | | | | | | | | Add checkboxes to the application settings page for restricted visibility levels, and remove those settings from gitlab.yml.
* | Remove old team scopes.Douwe Maan2015-03-151-1/+0
| |
* | Use `project_member` instead of `team_member`.Douwe Maan2015-03-151-2/+2
|/
* Issue #595: Support Slack notifications upon issue and merge request eventsStan Hu2015-03-031-2/+3
| | | | | | | | | | | 1) Adds a DB migration for all services to toggle on push, issue, and merge events. 2) Upon an issue or merge request event, fire service hooks. 3) Slack service supports custom messages for each of these events. Other services not supported at the moment. 4) Label merge request hooks with their corresponding actions.
* Add Irker serviceAorimn2015-03-011-0/+1
| | | | | | | | | | Irker is a gateway which sends IRC messages on git updates. This new service provides an interface to this gateway, integrated in Gitlab, for each updates. As per the guidelines, this commit adds the new feature in the CHANGELOG, tests and documentation. See http://www.catb.org/esr/irker/
* Expose avatar_url in projects APIsue4452015-03-011-0/+10
| | | | | | * Impl Project#avatar_url * Refactor ApplicationHelper: Use Project#avatar_url * Update changelog
* Merge branch 'extend_markdown_upload' into 'master'Dmitriy Zaporozhets2015-02-251-1/+1
|\ | | | | | | | | | | | | | | | | | | Generalizes image upload in drag and drop in markdown to all files From https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/265 by Hannes Rosenögger. - [x] Rebase on master when !1553 is merged in See merge request !1530
| * Merge branch 'master' into extend_markdown_uploadDouwe Maan2015-02-251-0/+6
| |\ | | | | | | | | | | | | # Conflicts: # app/controllers/files_controller.rb
| * \ Merge branch 'master' into extend_markdown_uploadDouwe Maan2015-02-241-1/+1
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # Conflicts: # app/views/projects/issues/_form.html.haml # app/views/projects/merge_requests/_form.html.haml # app/views/projects/merge_requests/_new_submit.html.haml # app/views/projects/milestones/_form.html.haml # app/views/projects/notes/_form.html.haml # app/views/projects/wikis/_form.html.haml # config/routes.rb # spec/controllers/projects_controller_spec.rb
| * | | Split up AttachmentUploader.Douwe Maan2015-02-201-1/+1
| | | |
| * | | Revert "Fix broken access control and refactor avatar upload"Dmitriy Zaporozhets2015-02-191-1/+1
| | | | | | | | | | | | | | | | This reverts commit 7d5f86f6cbd187e75a6ba164ad6bfd036977dd07.
| * | | Fix broken access control and refactor avatar uploadHannes Rosenögger2015-02-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit moves the note folder from /public/uploads/note to /uploads/note and changes the uploader accordingly. Now it's no longer possible to avoid the access control by modifing the url. The Avatar upload has been refactored to use an own uploader as well to cleanly seperate the two upload types.
* | | | Merge branch 'bitbucket-import'Dmitriy Zaporozhets2015-02-251-1/+1
|\ \ \ \ | |_|_|/ |/| | | | | | | | | | | | | | | Conflicts: app/views/import/gitorious/status.html.haml db/schema.rb
| * | | Add Bitbucket importer.Douwe Maan2015-02-241-1/+1
| | |/ | |/|
* | | use update_column and set to created_at like elsewhereMarco Wessel2015-02-231-3/+3
| | |
* | | Give last_activity_at a default value so it will always be setMarco Wessel2015-02-231-0/+6
|/ /
* | Upgrade to Rails 4.1.9Vinnie Okada2015-02-141-1/+1
|/ | | | | | Make the following changes to deal with new behavior in Rails 4.1.2: * Use nested resources to avoid slashes in arguments to path helpers.
* All services can have templates.Marin Jankovski2015-02-121-6/+1
|
* Add admin services templates.Marin Jankovski2015-02-111-3/+18
|
* Default issue tracker fix for creating default issue service.Marin Jankovski2015-02-091-1/+1
|
* Merge pull request #8580 from j0k3r/asanaDmitriy Zaporozhets2015-02-081-1/+2
|\ | | | | Add Asana service
| * Add Asana serviceJeremy2015-02-021-1/+2
| | | | | | | | Also add ability to render "service.help" in markdown
* | Refactor issuable sorting a bitDmitriy Zaporozhets2015-02-051-1/+1
| |
* | Refactor sorting in projectDmitriy Zaporozhets2015-02-051-7/+4
| |