summaryrefslogtreecommitdiff
path: root/spec/controllers
Commit message (Collapse)AuthorAgeFilesLines
* Merge commit 'dev/security' into 'master'Rémy Coutable2016-10-061-2/+2
|\ | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
| * Enforce the fork_project permission in Projects::CreateServiceNick Thomas2016-09-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Projects::ForkService delegates to this service almost entirely, but needed one small change so it would propagate create errors correctly. CreateService#execute needs significant refactoring; it is now right at the complexity limit set by Rubocop. I avoided doing so in this commit to keep the diff as small as possible. Several tests depend on the insecure behaviour of ForkService, so fi them up at the same time.
* | fix group links 404barthc2016-10-051-1/+36
| |
* | Merge branch 'restrict-failed-2fa-attempts' into 'master' Rémy Coutable2016-10-041-0/+38
|\ \ | | | | | | | | | | | | | | | | | | Restrict failed login attempts from users with 2FA enabled. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/19799. See merge request !6668
| * | Restrict failed login attempts for users with 2FASean McGivern2016-10-041-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Copy logic from `Devise::Models::Lockable#valid_for_authentication?`, as our custom login flow with two pages doesn't call this method. This will increment the failed login counter, and lock the user's account once they exceed the number of failed attempts. Also ensure that users who are locked can't continue to submit 2FA codes.
* | | Fix a few things after the initial improvment to Members::DestroyServiceRémy Coutable2016-10-032-4/+4
|/ / | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* | Add a /wip slash commandThomas Balthazar2016-10-031-0/+14
| | | | | | | | It toggles the 'WIP' prefix in the MR title.
* | Merge branch ↵Robert Speicher2016-10-021-1/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | '21983-member-add_user-doesn-t-detect-existing-members-that-have-requested-access' into 'master' Resolve "`Member.add_user`doesn't detect existing members that have requested access" ## What does this MR do? This merge request handle the case when an access requester is added to a group or project (via the members page or the API). In `Member.add_user`, if an access requester already exists, we simply accept their request (and set the `created_by`, `access_level` and `expires_at` attributes if given). ## Are there points in the code the reviewer needs to double check? I've taken the opportunity to cleanup the whole `{Group,Project}Member.add_user*` methods since it was quite a mess. ## What are the relevant issue numbers? Closes #21983 See merge request !6393
| * | Allow Member.add_user to handle access requestersRémy Coutable2016-09-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes include: - Ensure Member.add_user is not called directly when not necessary - New GroupMember.add_users_to_group to have the same abstraction level as for Project - Refactor Member.add_user to take a source instead of an array of members - Fix Rubocop offenses - Always use Project#add_user instead of project.team.add_user - Factorize users addition as members in Member.add_users_to_source - Make access_level a keyword argument in GroupMember.add_users_to_group and ProjectMember.add_users_to_projects - Destroy any requester before adding them as a member - Improve the way we handle access requesters in Member.add_user Instead of removing the requester and creating a new member, we now simply accepts their access request. This way, they will receive a "access request granted" email. - Fix error that was previously silently ignored - Stop raising when access level is invalid in Member, let Rails validation do their work Signed-off-by: Rémy Coutable <remy@rymai.me>
* | | fix broken repo 500 errors in UI and added relevant specsJames Lopez2016-09-291-0/+22
| | |
* | | Fix test failure by accessing Content-Type header directly.cs-upgrade-deviseConnor Shea2016-09-271-1/+1
|/ /
* | Merge branch 'rc-new-members-approve-request-access-service' into 'master' Douwe Maan2016-09-271-1/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | New `Members::ApproveAccessRequestService` Part of #21979. ## Does this MR meet the acceptance criteria? - [x] API support added - Tests - [x] Added for this feature/bug - [x] All builds are passing - [ ] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html) - [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [x] Branch has no merge conflicts with `master` (if you do - rebase it please) - [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) See merge request !6266
| * | Ensure Members::ApproveAccessRequestService can fin a requester by IDRémy Coutable2016-09-221-1/+2
| |/ | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* | Improve project_with_board factory to create the default listsimprovement/project-with-board-factoryDouglas Barbosa Alexandre2016-09-261-3/+0
|/
* Merge branch 'and-you-get-awards' into 'master' Rémy Coutable2016-09-211-2/+31
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | And Snippets get awards ## What does this MR do? Makes snippets more awesome, by making them awardables ## Why was this MR needed? Because Snippets were left behind. ## What are the relevant issue numbers? Closes #17878 See merge request !4456
| * Fix tests for Snippets toggling awardsZ.J. van de Weg2016-09-191-4/+6
| | | | | | | | Also incorporate feedback
| * Snippets get award emoji! :thumbsup:Z.J. van de Weg2016-09-191-2/+29
| |
* | Merge branch 'feature/github-edit-path' into 'master' Rémy Coutable2016-09-201-12/+34
|\ \ | | | | | | | | | | | | | | | | | | Lets the user choose a namespace and name on Github imports Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/14971 See merge request !5728
| * | modify github import JS and controller so we can now specify a namespace ↵James Lopez2016-09-201-12/+34
| |/ | | | | | | | | | | | | | | and/or name for a project. - Fixed and added specs. - Added different namespace options depending on user privilages - Updated docs.
* | Fix initial implementation to actually render the unsubscribe pageRémy Coutable2016-09-201-4/+10
| | | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* | Fix "Unsubscribe" link in notification emails that is triggered by anti-virusMaximiliano Perez Coto2016-09-201-13/+90
|/ | | | | | | | | * Created a force=true param that will continue with the previous behaviour of the unsubscribe method * Created a filter for not-logged users so they see a unsubsribe confirmation page * Added the List-Unsubscribe header on emails so the email client can display it on top
* Improve grammarKatarzyna Kobierska2016-09-131-1/+1
|
* Add #closed_without_source_project?Katarzyna Kobierska2016-09-131-3/+3
|
* Checks if deleting forked project closed all open merge requestsKatarzyna Kobierska2016-09-131-3/+5
|
* Before deleting project if forked unlink forkKatarzyna Kobierska2016-09-131-0/+17
|
* Merge branch 'add-remember-option-u2f' into 'master' Robert Speicher2016-09-091-0/+23
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pass the remember_me option into the u2f form and support it while authenticating ## What does this MR do? Adds remember me support in the u2f authentication, and makes sure the flag gets passed from the login form to the u2f form. Based on the changes for the same thing done for regular 2fa: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4369 ## Why was this MR needed? The remember me option wasn't working for u2f devices (yubikey) ## What are the relevant issue numbers? Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/18103 See merge request !5918
| * Pass the remember_me option into the u2f form and support it while ↵add-remember-option-u2fDJ Mountney2016-09-011-0/+23
| | | | | | | | | | | | authenticating Matches the changes done for non-u2f two-factor auth
* | Refresh todos count cache when an Issue/MR is deletedDouglas Barbosa Alexandre2016-09-082-0/+12
| |
* | Merge branch 'master' of https://dev.gitlab.org/gitlab/gitlabhqRémy Coutable2016-09-053-30/+93
|\ \ | | | | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
| * | Don't create groups for unallowed users when importing projectsDouglas Barbosa Alexandre2016-08-313-30/+93
| | |
* | | Fix missing flash messages on service edit pageAirat Shigapov2016-09-051-0/+16
| |/ |/|
* | Project tools visibility levelFelipe Artur2016-09-011-1/+1
| |
* | Merge branch 'refactor/add-policies' into 'master' Robert Speicher2016-08-313-6/+6
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactor ability.rb into Policies ## What does this MR do? Factors out `ability.rb` into a new abstraction - the "policy" (stored in `app/policies`). A policy is a class named `#{class_name}Policy` (looked up automatically as needed) that implements `rules` as follows: ``` ruby class ThingPolicy < BasePolicy def rules @user # this is a user to determine abilities for, optionally nil in the anonymous case @subject # this is the subject of the ability, guaranteed to be an instance of `Thing` can! :some_ability # grant the :some_ability permission cannot! :some_ability # ensure that :some_ability is not allowed. this overrides any `can!` that is called before or after delegate! @subject.other_thing # merge the abilities (can!) and prohibitions (cannot!) from `@subject.other_thing` can? :some_ability # test whether, so far, :some_ability is allowed end def anonymous_rules # optional. if not implemented `rules` is called where `@user` is nil. otherwise this method is called when `@user` is nil. end end ``` See merge request !5796
| * remove Ability.abilitieshttp://jneen.net/2016-08-303-6/+6
| |
* | Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ceStan Hu2016-08-301-0/+29
|\ \ | |/
| * Improve grammarKatarzyna Kobierska2016-08-301-2/+2
| |
| * User can edit closed MR with deleted forkKatarzyna Kobierska2016-08-301-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add test for closed MR without fork Add view test visibility of Reopen and Close buttons Fix controller tests and validation method Fix missing space Remove unused variables from test closed_without_fork? method refactoring Add information about missing fork When closed MR without fork can't edit target branch Tests for closed MR edit view Fix indentation and rebase, refactoring
* | Fix issue boards leak private label names and descriptionsDouglas Barbosa Alexandre2016-08-291-15/+24
|/
* Fix external issue tracker "Issues" link leading to 404sfix-external-issue-tracker-linkStan Hu2016-08-251-2/+2
| | | | | | | | a70431f874 modified the behavior to link to the external issue tracker issues URL instead of the project path URL. This restores the previous behavior. Closes #21252, #21402
* Remove gitoriouszj-remove-gitoriousZ.J. van de Weg2016-08-251-69/+0
|
* Fix incorrect "stopped impersonation" log messagefix-impersonation-logStan Hu2016-08-231-0/+2
| | | | Closes #21015
* Merge branch '17932-move-to-project-dropdown' into 'master' Jacob Schatz2016-08-191-0/+50
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move to project dropdown with infinite scroll for better performance ## What does this MR do? On the Move dropdown on the edit issue page we introduced infinite scrolling to just return a limited number of projects, 50 items. So if the user can move the issue to 50 or more items when scroll down on the list a new set of projects will be requested to the server. ## Are there points in the code the reviewer needs to double check? ## Why was this MR needed? See #17932 ## What are the relevant issue numbers? Closes #17932 ## Screenshots (if relevant) ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - ~~[ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)~~ - ~~[ ] API support added~~ - Tests - [x] Added for this feature/bug - [x] All builds are passing - [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [x] Branch has no merge conflicts with `master` (if you do - rebase it please) - [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) See merge request !5686
| * Move to project dropdown with infinite scroll for better performance17932-move-to-project-dropdownPaco Guzman2016-08-181-0/+50
| | | | | | | | | | | | | | | | | | | | Use just SQL to check is a user can admin_issue on a project Using offset pagination instead pages to avoid a count query Tradeoff - we duplicate how we check admin_issue in a SQL relation in the Ability class
* | Merge branch 'master' into diff-line-comment-vuejsConnor Shea2016-08-174-0/+540
|\ \ | |/
| * Merge branch 'issue-boards' into 'master' Douwe Maan2016-08-173-0/+404
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Issue boards ## What are the relevant issue numbers? - Issue: #17907 - Issue backend: #20335 - Backend MR: !5548 - Frontend MR: !5554 - Documentation !5713 ## Screenshots (if relevant) ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - [X] ~~[Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)~~ - [X] ~~API support added~~ - Tests - [x] Added for this feature/bug - [x] All builds are passing - [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [x] Branch has no merge conflicts with `master` (if you do - rebase it please) - [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) See merge request !5548
| | * Move the set up of the state described in context to a before blockDouglas Barbosa Alexandre2016-08-173-11/+21
| | |
| | * Remove # from controller actions specsDouglas Barbosa Alexandre2016-08-173-8/+8
| | |
| | * Fix matcher `match_response_schema`Douglas Barbosa Alexandre2016-08-172-3/+3
| | |
| | * Move action to render board lists to `Projects::Boards::ListsController`Douglas Barbosa Alexandre2016-08-172-51/+51
| | |
| | * Move board related controllers to the `Boards` namespaceDouglas Barbosa Alexandre2016-08-172-2/+2
| | |