Commit Graph

371 Commits

Author SHA1 Message Date
Ævar Arnfjörð Bjarmason b6ba8cc696 Add ability suppress the global "You won't be able [use] SSH" message
This fixes gitlab-org/gitlab-ce#49953, as noted in the documentation
this feature is intended to be used when SSH certificates are
enabled. Then this warning becomes not only pointless, but also
misleading.

This builds on top of gitlab-org/gitlab-ce!21009 since both need to
modify the same documentation, which avoids a merge conflict.

See also the gitlab-org/gitlab-ce#49218 issue and associated merge
request.
2018-08-08 17:28:27 +02:00
George Tsiolis e4e824c169 Replace author_link snake case in stylesheets, specs, and helpers 2018-07-24 10:53:59 +03:00
Zeger-Jan van de Weg 9946328761
Remove sanitize_repo_path
This method is unneeded given its been pushed to Gitaly, through
https://gitlab.com/gitlab-org/gitaly/merge_requests/780

Closes https://gitlab.com/gitlab-org/gitaly/issues/1235
2018-07-17 13:30:06 +02:00
Francisco Javier López 837c3b3d73 Fix User role displayed on projects dashboard 2018-07-06 07:51:31 +00:00
Alessio Caiazza 6dd181da16 Merge remote-tracking branch 'dev/master' 2018-06-25 18:19:29 +02:00
Alessio Caiazza 8d18f219fe Merge branch 'security-html_escape_usernames' into 'master'
[master] HTML escape the name of the user in ProjectsHelper#link_to_member

See merge request gitlab/gitlabhq!2401
2018-06-25 16:16:45 +00:00
Olivier Gonzalez a2e641a67d Update project sidebar to work with EE feature Security Dashboard 2018-06-25 14:47:27 +00:00
Lukas Eipert a7ed65f549 Backport code from gitlab-ee!6182 2018-06-20 16:38:42 +00:00
Jacob Vosmaer (GitLab) e9e9da822a More gitaly disk access blocks 2018-06-20 09:33:50 +00:00
Imre Farkas 1fbf6f1869
HTML escape the name of the user in ProjectsHelper#link_to_member 2018-06-15 14:26:48 +02:00
Dmitriy Zaporozhets 9bdd685a7a Merge branch '47851-bump-cache-for-old-master-permission' into 'master'
Resolve "Reference to master still cached"

Closes #47851

See merge request gitlab-org/gitlab-ce!19827
2018-06-14 12:10:34 +00:00
Mark Chao 53131e6753 Flush cache for project list
For master->maintainer permission rename
2018-06-14 16:59:24 +08:00
Rubén Dávila 6a0178d832 Invalidate cache with project details when repository is updated
The partial using this cache key was showing stale information due to
the cache not being invalidated.
2018-06-13 11:57:18 -05:00
Stan Hu b61e1e7a5c Fix invisible rows on importer status 2018-06-06 01:09:58 +00:00
Jacob Vosmaer (GitLab) a0808df0b6 Find and mark more Git disk access locations 2018-06-05 15:51:14 +00:00
André Luís bc59fc3719 Resolve "Add Xcode Button in UI" 2018-06-05 10:10:34 +00:00
Lukas Eipert 7a0f15e2c6 Resolve "Operations navigation menu renders empty menu when user does not have the right permissions" 2018-05-29 11:37:59 +00:00
Lukas Eipert 762672fd26 Project Sidebar: Split CI/CD into CI/CD and Operations 2018-05-16 11:16:33 +00:00
James Ramsay 564050ec0f Enable LFS setting UI for Masters and Owners
LFS can be enabled and disabled per project using the API by Masters
and Owners, but the UI is only available to Admins. The interface and
API should be consistent.

LFS can also be enabled and disabled per group using the API by Owners,
but the UI is only available to Admins. This interface should also be
consistent.

Additionally removes an unneeded check if 2FA interface, since the
interface is only available to Owners.

Closes #33320
2018-05-01 15:37:33 +02:00
Zeger-Jan van de Weg ec4423665c
Gitlab::Shell works on shard name, not path
Direct disk access is done through Gitaly now, so the legacy path was
deprecated. This path was used in Gitlab::Shell however. This required
the refactoring in this commit.

Added is the removal of direct path access on the project model, as that
lookup wasn't needed anymore is most cases.

Closes https://gitlab.com/gitlab-org/gitaly/issues/1111
2018-04-25 13:36:22 +02:00
Mike Greiling bbb24da922 Resolve "Clean up old project permissions frontend code" 2018-04-12 15:47:40 +00:00
Rob Watson 9d45951fca Add HTTPS-only pages
Closes #28857
2018-03-22 19:58:36 +01:00
Dmitriy Zaporozhets 8fe9995f11
Replace deprecated name_with_namespace with full_name in app and spec
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2018-03-05 16:15:26 +02:00
Douwe Maan f4bc6ec92e Merge branch 'bvl-external-auth-port' into 'master'
Port `read_cross_project` ability from EE

See merge request gitlab-org/gitlab-ce!17208
2018-02-23 09:14:14 +00:00
André Luís da531c3905 Add Tip about Push to Create project on New Project page 2018-02-23 09:00:19 +00:00
Bob Van Landuyt 148816cd67 Port `read_cross_project` ability from EE 2018-02-22 17:11:36 +01:00
Eric Eastwood 2e29597c94 Merge branch 'master' into 42431-add-auto-devops-and-clusters-button-to-projects 2018-02-22 09:34:44 -06:00
Oswaldo Ferreira e0e3f1c275 Move button list logic to project presenter 2018-02-20 13:03:06 -03:00
Eric Eastwood b866cba7f5 Add Auto DevOps and Kubernetes cluster button to project page 2018-02-16 00:51:35 -06:00
Yorick Peterse 2e8d366da7 Merge branch '42800-change-usage-of-avatar_icon' into 'master'
Change all occurrences of ApplicationHelper#avatar_icon to use a User object where possible

Closes #42800

See merge request gitlab-org/gitlab-ce!16976
2018-02-14 12:59:08 +00:00
Jarka Kadlecová 499d050185 Display a link to external issue tracker when enabled 2018-02-14 08:48:19 +01:00
Andreas Brandl be231d2165 Use more specific #avatar_icon_for_user.
Whenever we already deal with a User object, let's use the more specific
method avatar_icon_for_user.
2018-02-13 18:04:51 +01:00
Mario de la Ossa eaada9d706 use Gitlab::UserSettings directly as a singleton instead of including/extending it 2018-02-02 18:39:55 +00:00
James Ramsay 4eaeea6e20
Remove downcase from special path helper 2018-01-04 11:22:04 -05:00
Markus Koller 257fd57134 Allow password authentication to be disabled entirely 2017-11-23 13:16:14 +00:00
Bob Van Landuyt 39d00bddc4 Make sure the settings page renders when root of a fork is deleted 2017-11-03 11:08:36 +01:00
Maxim Rydkin 239b274855 Decrease Perceived Complexity threshold to 14 2017-10-20 16:21:44 +00:00
Kamil Trzcinski 25a1ef6933 Introduce policy check for clusters navigation option 2017-10-03 23:22:35 +02:00
Luke "Jared" Bennett 9cd87f6fa9
Add lazy_load option to participant avatar helper 2017-09-28 13:29:32 +01:00
Phil Hughes eab0ca8a0b
Fixes dashboard/projects empty state showing when viewing personal projects
This was caused by the `@projects` value being empty when the current
user does not have any personal projects.
2017-09-22 12:12:16 +01:00
Brandon Everett 528f90b4e5 escape characters in git user name 2017-09-13 12:39:50 +00:00
Yorick Peterse 83355336dd
Rework how recent push events are retrieved
Whenever you push to a branch GitLab will show a button to create a
merge request (should one not exist already). The underlying code to
display this data was quite inefficient. For example, it involved
multiple slow queries just to figure out what the most recent push event
was.

This commit changes the way this data is retrieved so it's much faster.
This is achieved by caching the ID of the last push event on every push,
which is then retrieved when loading certain pages. Database queries are
only executed if necessary and the cached data is removed automatically
once a merge request has been created, or 2 hours after being stored.

A trade-off of this approach is that we _only_ track the last event.
Previously if you were to push to branch A and B then create a merge
request for branch B we'd still show the widget for branch A. As of this
commit this is no longer the case, instead we will only show the widget
for the branch you pushed to most recently. Once a merge request exists
the widget is no longer displayed. Alternative solutions are either too
complex and/or too slow, hence the decision was made to settle for this
trade-off.

Performance Impact
------------------

In the best case scenario (= a user didn't push anything for more than 2
hours) we perform a single Redis GET per page. Should there be cached
data we will run a single (and lightweight) SQL query to get the
event data from the database. If a merge request already exists we will
run an additional DEL to remove the cache key.

The difference in response timings can vary a bit per project. On
GitLab.com the 99th percentile of time spent in User#recent_push hovers
between 100 milliseconds and 1 second, while the mean hovers around 50
milliseconds. With the changes in this MR the expected time spent in
User#recent_push is expected to be reduced down to just a few
milliseconds.

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/35990
2017-09-08 00:46:16 +02:00
Mike Greiling 03b14b48a0 Resolve "Make project and features visibility settings less confusing" 2017-09-07 18:07:40 +00:00
Maxim Rydkin 091b1c5ed5
remove unnecessary args from `link_to_member_avatar` method in `app/helpers/projects_helper.rb` 2017-09-07 13:27:23 +03:00
Maxim Rydkin 2a54cbcab8
fix project_helper.rb and add couple specs to it 2017-09-07 13:16:15 +03:00
Maxim Rydkin 0963ac3636
fix helper and spec 2017-09-07 13:16:14 +03:00
Maxim Rydkin db3bc89792
refactor `app/helpers/projects_helper.rb:21:3` 2017-09-07 13:16:14 +03:00
Phil Hughes 80a013ef4f removed show_new_nav? references 2017-09-06 12:19:03 +01:00
Phil Hughes 2aa8a75f69 Merge branch 'master' into breadcrumbs-improvements 2017-09-06 12:12:19 +01:00
Phil Hughes ddb3692a22 Clean up new navigation templates 2017-09-06 10:58:24 +00:00