summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Random selection now also works for MySQLseed-fu-award-emojiZ.J. van de Weg2016-06-151-0/+4
|
* Filter out classes without names in the samplerYorick Peterse2016-06-141-1/+5
| | | | | | We can't do a lot with classes without names as we can't filter by them, have no idea where they come from, etc. As such it's best to just ignore these.
* Merge branch '13948-access-request-to-projects-and-groups' into 'master' Douwe Maan2016-06-142-5/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow users to request access to projects and groups #### TODO: - [x] Factorize the projects & groups members list - [x] Factorize `request_access` and `approve` controller methods into a concern - [x] Factorize the project & group dropdowns - [x] Factorize access request routes - [x] Factorize mailers #### Will be done in separate MRs - [ ] Documentation - [ ] API #### Access request to project - [x] Design project access request button to spec (defined in #13948) - [x] Request access to a project as a logged in user - [x] Withdraw access request to a project as a logged in user - [x] Do not treat project member request as actual membership (done partly in Ability) - [x] Display access requests on project's members page (+ allow to change level, approve, and deny request) - [x] Email requesting user at notification email address when accepted/denied - [x] Email all project admins at notification email addresses when new access request - [x] Unit specs to cover new functionality: `AccessRequestable` is missing specs - [x] Controller specs to cover new functionality - [x] Mailer specs to cover new functionality - [x] Features specs to cover new UI and interactions - [x] Regression specs still passing #### Access request to group - [x] Design group access request button to spec (defined in #13948) - [x] Request access to a group as a logged in user - [x] Withdraw access request to a group as a logged in user - [x] Do not treat group member request as actual membership - [x] Display access requests on group's members page (+ allow to change level, approve, and deny request) - [x] Email requesting user at notification email address when accepted/denied - [x] Email all project admins at notification email addresses when new access request - [x] Unit specs to cover new functionality - [x] Controller specs to cover new functionality - [x] Mailer specs to cover new functionality - [x] Features specs to cover new UI and interactions - [x] Regression specs still passing Closes #13948. ### Requesting access to a project #### Responsive UI ![request-access-to-project](/uploads/59337d84ca4c2f637dfd73fca038def9/request-access-to-project.gif) #### Request access link ![1-project-request-access-link](/uploads/5436f7854bc48bff74b2664b311920c6/1-project-request-access-link.png) #### Flash once access is requested ![2-project-request-access-flash](/uploads/8b304dd737431c47d00ee90ab88b8098/2-project-request-access-flash.jpg) #### Email sent to project admins on new access requests ##### HTML Email ![3-project-request-access-email-html](/uploads/63842c9bd4e43a907ab189087dd24cad/3-project-request-access-email-html.jpg) ##### Plain Email ![4-project-request-access-email-plain](/uploads/249289418678c65abfcf4c1e944986c6/4-project-request-access-email-plain.jpg) ### Withdrawing access request to a project #### Withdraw access request link ![5-project-withdraw-request-link](/uploads/932984713a98f03ad75cd9606245cbe2/5-project-withdraw-request-link.png) #### Withdraw access request confirmation dialog box ![6-project-withdraw-request-confirm](/uploads/bf6afb5b83ad8ba31443812d0ccbc50b/6-project-withdraw-request-confirm.png) #### Flash once access has been withdrawn ![6-2-project-withdraw-request-confirm](/uploads/4dea00452adc4febd7cff4a969a7830a/6-2-project-withdraw-request-confirm.png) ### Access requests management page ![7-project-access-requests](/uploads/2030399fa9ce261e0df4bd3d399bfc24/7-project-access-requests.jpg) #### Deny access request confirmation dialog box ![8-project-access-request-deny-confirm](/uploads/b6ffcc3092b037fb4d3a5f1929befa90/8-project-access-request-deny-confirm.png) #### Email sent to requester on denied access requests ##### HTML Email ![9-project-request-access-denied-email-html](/uploads/7fb26d627f8919039ce88302e72ede83/9-project-request-access-denied-email-html.jpg) ##### Plain Email ![10-project-request-access-denied-email-plain](/uploads/34a21f2266e3238dc29b93f855183fb0/10-project-request-access-denied-email-plain.jpg) #### Email sent to requester on granted access requests ##### HTML Email ![11-project-request-access-granted-email-html](/uploads/cecd4d874885c48dd8bb420f19defd8f/11-project-request-access-granted-email-html.jpg) ##### Plain Email ![12-project-request-access-granted-email-plain](/uploads/636446f7a711904231d592add2de83dc/12-project-request-access-granted-email-plain.jpg) ---------------------------------- ---------------------------------- ### Requesting access to a group #### Responsive UI ![request-access-to-group](/uploads/b319b8844836ad599ad4d562f3ba6057/request-access-to-group.gif) #### Request access link ![1-group-request-access-link](/uploads/1eccd38061f0183ba71c482f51ebf53a/1-group-request-access-link.png) #### Flash once access is requested ![2-group-request-access-flash](/uploads/bbb94ede6c54cd0b6b28e8e1196f687c/2-group-request-access-flash.jpg) #### Email sent to project admins on new access requests ##### HTML Email ![3-group-request-access-email-html](/uploads/7df7196e83d80bea861ea94bd8f3f390/3-group-request-access-email-html.jpg) ##### Plain Email ![4-group-request-access-email-plain](/uploads/55a1abcd7a42368f3ba8f20650339e4a/4-group-request-access-email-plain.jpg) ### Withdrawing access request to a project #### Withdraw access request link ![5-group-withdraw-request-link](/uploads/d02ed4f353a334a0a6c181da6006f0d6/5-group-withdraw-request-link.png) #### Withdraw access request confirmation dialog box ![6-group-withdraw-request-confirm](/uploads/09d6e123390f257aff9aed3b08695ad6/6-group-withdraw-request-confirm.png) #### Flash once access has been withdrawn ![6-2-group-withdraw-request-confirm](/uploads/cf300d2292d0c10ca592424860b80d20/6-2-group-withdraw-request-confirm.png) ### Access requests management page ![7-group-access-requests](/uploads/821c55ba4276112b1994ca87b0c5e1ad/7-group-access-requests.jpg) #### Deny access request confirmation dialog box ![8-group-access-request-deny-confirm](/uploads/68fad9da8bc82492be3f6d55d33dba17/8-group-access-request-deny-confirm.png) #### Email sent to requester on denied access requests ##### HTML Email ![9-group-request-access-denied-email-html](/uploads/48a8e0cc2cea3b36529b04d259dc8e65/9-group-request-access-denied-email-html.jpg) ##### Plain Email ![10-group-request-access-denied-email-plain](/uploads/85d95642a218eaf52a35da8a7a0ac8ed/10-group-request-access-denied-email-plain.jpg) #### Email sent to requester on granted access requests ##### HTML Email ![11-group-request-access-granted-email-html](/uploads/b18949a6538168824f3d0c272d89dd81/11-group-request-access-granted-email-html.jpg) ##### Plain Email ![12-group-request-access-granted-email-plain](/uploads/c33c7847ab86eeab4b07714467573f63/12-group-request-access-granted-email-plain.jpg) See merge request !3798
| * Merge branch 'master' into 13948-access-request-to-projects-and-groupsDouwe Maan2016-06-1414-45/+350
| |\ | | | | | | | | | | | | # Conflicts: # app/views/layouts/nav/_project.html.haml
| * | UI and copywriting improvements13948-access-request-to-projects-and-groupsRémy Coutable2016-06-141-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | + Move 'Edit Project/Group' out of membership-related partial + Show the access request buttons only to logged-in users + Put the request access buttons out of in a more visible button + Improve the copy in the #remove_member_message helper Signed-off-by: Rémy Coutable <remy@rymai.me>
| * | Add request access for groupsRémy Coutable2016-06-141-1/+1
| | | | | | | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* | | Merge branch '18449-instrument-grape-endpoints' into 'master' Yorick Peterse2016-06-141-1/+24
|\ \ \ | | | | | | | | | | | | | | | | Instrument Grape API endpoints See merge request !4587
| * | | Instrument Grape Endpoint with Metrics::RackMiddleware18449-instrument-grape-endpointsPaco Guzman2016-06-141-1/+24
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Generating the following tags Grape#GET /projects/:id/archive from Grape::Route objects like { :path => /:version/projects/:id/archive(.:format) :version => “v3”, :method => “GET” } Use an instance variable to cache raw_path transformations. This variable is only going to growth to the number of endpoints of the API, not with exact different requests We can store this cache as an instance variable because middleware are initialised only once
* | | Merge branch '18527-instrument-private-methods' into 'master' Yorick Peterse2016-06-141-4/+6
|\ \ \ | |_|/ |/| | | | | | | | Instrument private methods and instance private methods See merge request !4639
| * | Instrument private/protected methodsPaco Guzman2016-06-141-4/+6
| | | | | | | | | | | | | | | | | | | | | By default instrumentation will instrument public, protected and private methods, because usually heavy work is done on private method or at least that’s what facts is showing
* | | Merge remote-tracking branch 'origin/master' into artifacts-expire-dateKamil Trzcinski2016-06-1411-49/+321
|\ \ \ | |/ /
| * | Merge branch '18528-cpu-time-instrumentation' into 'master' Yorick Peterse2016-06-141-4/+7
| |\ \ | | | | | | | | | | | | | | | | Measure CPU time for instrumented methods See merge request !4640
| | * | Measure CPU time for instrumented methodsPaco Guzman2016-06-141-4/+7
| | |/
| * | Merge branch 'refactor/ci-config-add-global-entry' into 'master' Rémy Coutable2016-06-149-27/+303
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add global entry with before script to new CI config ## What does this MR do? This MR adds a new entries to a new CI config class. It is next refactoring step after !4462. See #15060 See merge request !4482
| | * | Validate ci config entry value before processing nodesrefactor/ci-config-add-global-entryGrzegorz Bizon2016-06-142-8/+11
| | | |
| | * | Make method that composes ci config entry privateGrzegorz Bizon2016-06-142-7/+7
| | | |
| | * | Merge branch 'master' into refactor/ci-config-add-global-entryGrzegorz Bizon2016-06-1310-93/+133
| | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (59 commits) Improved SVG sanitizer specs to include smoke tests for clean. Refactored SVG sanitizer Added SVG sanitizer fix to the changelog Refactor SVG sanitizer and prevent `xlink:href` to refer to external resources Fix SVG whitelisting to allow namespaced attributes Fix Error 500 when using closes_issues API with an external issue tracker Center layout navigation and remove icons Fix preferences_spec test Add back sidebar counters and username Only create the backup directory if it is local Fix safari logo loading animation safari bug Revert side nav to full width; remove border under nav; remove tooltips on nav links; stop page content shifting with side nav; put project nav in container Update media queries Fix profile test Fix logo at all screen widths, update sidebar text Move tanuki icon to center of nav bar; keep nav closed by default; remove collapsed nav cookie Remove unused MergeRequest#gitlab_merge_status method Add CHANGELOG item for labels/milestones navigation change Render issues link on issues subnav unless you visit merge request controller Render only issues/mr in subnav depends on context ...
| | * | | Simplify ci config node factoryGrzegorz Bizon2016-06-132-11/+6
| | | | |
| | * | | Duplicate CI config node factory on class levelGrzegorz Bizon2016-06-132-4/+6
| | | | |
| | * | | Add factory for fabricating new ci config nodesGrzegorz Bizon2016-06-103-21/+57
| | | | |
| | * | | Define ci entry accessor instead of method_missingGrzegorz Bizon2016-06-102-7/+6
| | | | |
| | * | | Simplify new ci config entry class interfaceGrzegorz Bizon2016-06-104-23/+14
| | | | |
| | * | | Rename method used to allow node in Ci configGrzegorz Bizon2016-06-102-5/+5
| | | | |
| | * | | Merge branch 'master' into refactor/ci-config-add-global-entryGrzegorz Bizon2016-06-1017-106/+206
| | |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (147 commits) Minor MR comment fixes. Update CHANGELOG for 8.8.4 and 8.8.5 Properly quote table name in Rake task for MySQL and PostgreSQL compatibility Checks based on whether data is loaded not undefined Checks for undefined when inserting autocomplete into textarea Ignore frequent emojis in search. Fixed tests CHANGELOG Improved the UX of issue & milestone date picker Change date format to be non zero padded in order to fix failing test Update method name for better understanding Add tests for dates on tooltips Fix local timeago on user dashboard Update CHANGELOG Toggling a task in a description with mentions doesn't creates a Todo Update CHANGELOG Fixed failing label subscribe test Tests update Updated subscribe icon Fixed failing tests ...
| | * | | | Rename method that returns allowed nodes in Ci configGrzegorz Bizon2016-06-092-8/+8
| | | | | |
| | * | | | Add comments to new CI config classes and modulesGrzegorz Bizon2016-06-096-2/+35
| | | | | |
| | * | | | Do not require Ci config node to have a hash valueGrzegorz Bizon2016-06-092-4/+8
| | | | | |
| | * | | | Make it possible configure Ci entry descriptionGrzegorz Bizon2016-06-094-16/+18
| | | | | |
| | * | | | Extract method that composes new Ci config entryGrzegorz Bizon2016-06-091-3/+7
| | | | | |
| | * | | | Move new Ci config configurable DSL to concernGrzegorz Bizon2016-06-093-26/+49
| | | | | |
| | * | | | Rename BeforeScript to Script in new Ci configGrzegorz Bizon2016-06-082-2/+2
| | | | | |
| | * | | | Add minor improvements in new Ci config designGrzegorz Bizon2016-06-082-13/+28
| | | | | |
| | * | | | Delegate Ci config entry value to single methodGrzegorz Bizon2016-06-084-17/+32
| | | | | |
| | * | | | Remove old before_script from legacy Ci configGrzegorz Bizon2016-06-081-2/+1
| | | | | |
| | * | | | Merge branch 'master' into refactor/ci-config-add-global-entryGrzegorz Bizon2016-06-0847-381/+549
| | |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (285 commits) Bump recaptcha gem to 3.0.0 to remove deprecated stoken support Load knapsack in Rakefile only when is bundled Add License Finder information to contribution acceptance criteria. Add LGPLv2 to license whiltelist Instrument `RepositoryCheck::SingleRepositoryWorker` manually Bump nokogiri to 1.6.8 Fix alignment of wiki top area Update charcoal theme colors Update nav link font size and spacing; fix hamburger icon Fix control btn position Remove todos count tests in nav Test impersonation using img data attribute instead of username Implement compact side nav Fix knapsack for master Align links and tabs Add scrolling tabs to code subnav Finish styling sub nav Updated colors Fixed failing tests CHANGELOG item ... Conflicts: lib/gitlab/ci/config.rb spec/lib/gitlab/ci/config_spec.rb
| | * | | | | Implement script in Ci config and use in legacy oneGrzegorz Bizon2016-06-075-1/+24
| | | | | | |
| | * | | | | Add DSL for adding nodes in Ci config interfaceGrzegorz Bizon2016-06-074-12/+12
| | | | | | |
| | * | | | | Use Ci config validation helpers only where neededGrzegorz Bizon2016-06-075-29/+31
| | | | | | |
| | * | | | | Do not process new Ci config entry when invalidGrzegorz Bizon2016-06-071-2/+6
| | | | | | |
| | * | | | | Pass root Ci config entry to each subsequent entryGrzegorz Bizon2016-06-072-6/+6
| | | | | | |
| | * | | | | Add Ci config entry that implements Null ObjectGrzegorz Bizon2016-06-072-10/+29
| | | | | | |
| | * | | | | Do not process Ci config node when node is a leafGrzegorz Bizon2016-06-071-2/+8
| | | | | | |
| | * | | | | Use CI config errors from new processor in legacy oneGrzegorz Bizon2016-06-063-6/+12
| | | | | | |
| | * | | | | Collect errors from all nodes in new CI configGrzegorz Bizon2016-06-061-3/+15
| | | | | | |
| | * | | | | Validate new before script CI configuration entryGrzegorz Bizon2016-06-062-5/+10
| | | | | | |
| | * | | | | Extract CI config validation helpers to mixinGrzegorz Bizon2016-06-062-16/+28
| | | | | | |
| | * | | | | Implement CI configuration nodes tree processingGrzegorz Bizon2016-06-063-4/+28
| | | | | | |
| | * | | | | Rename ci config module that holds nodes to NodeGrzegorz Bizon2016-06-064-17/+18
| | | | | | |
| | * | | | | Add ci config global and before_script entriesGrzegorz Bizon2016-06-063-0/+41
| | | | | | |
| * | | | | | Merge branch 'fix-markdown-spec' into 'master' Douwe Maan2016-06-141-12/+5
| |\ \ \ \ \ \ | | |_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add whitelisted elements correctly in sanitization Add whitelisted elements correctly in sanitization Consider this command: bundle exec rails r "include GitlabMarkdownHelper puts markdown('<span>this is a span</span>', pipeline: :description) puts markdown('<span>this is a span</span>')" And the same in the opposite order: bundle exec rails r "include GitlabMarkdownHelper puts markdown('<span>this is a span</span>') puts markdown('<span>this is a span</span>', pipeline: :description)" Before this change, they would both output: <p><span>this is a span</span></p> <p>this is a span</p> That's because `span` is added to the list of whitelisted elements in the `SanitizationFilter`, but this method tries not to make the same changes multiple times. Unfortunately, `HTML::Pipeline::SanitizationFilter::LIMITED`, which is used by the `DescriptionPipeline`, uses the same Ruby objects for all of its hash values _except_ `:elements`. That means that whichever of `DescriptionPipeline` and `GfmPipeline` is called first would have `span` in its whitelisted elements, and the second wouldn't. Fix this by adding a special check for modifying `:elements` twice, then checking `:transformers` as before. See merge request !4588