67 Commits

Author SHA1 Message Date
Alexander Brandon Coles f15be6e07f Freeze string literals in app/controllers
rubocop -A --only Style/FrozenStringLiteralComment,Layout/EmptyLineAfterMagicComment,Style/RedundantFreeze app/controllers
2025-07-18 17:51:00 +01:00
Oliver Günther a5fa8a24c3 Skip CSRF on repo-auth API
https://community.openproject.org/work_packages/63534
2025-04-22 20:19:56 +02:00
Oliver Günther 4d7bff2103 Restore fetch changesets functionality 2024-12-06 10:00:23 +01:00
Oliver Günther 58c576f55d Remove unused sys actions
These actions were never documented except for fetch_changesets, and we
can use the 15.0 release to remove support for it.
2024-10-28 13:05:15 +01:00
Ivan Kuchin 4911b8a149 remove years from copyrights (except for COPYRIGHT file) 2024-07-31 15:02:49 +02:00
Oliver Günther c7286fb91f Set default host at all times
This results in us having to use a bit more helpers around request and feature specs
to ensure that the configured host name also matches the requested one.
2024-07-08 16:11:09 +02:00
ulferts 3b2121f733 Revert "Merge remote-tracking branch 'origin/release/13.4' into dev"
This reverts commit 40b2bbeb09, reversing
changes made to b4c6cb17cc.
2024-03-21 11:31:17 +01:00
Ivan Kuchin 7787e457a3 Revert "Merge branch 'dev' into release/13.4"
This reverts commit a901541269, reversing
changes made to e573ca00b7.
2024-03-20 20:19:08 +01:00
Ivan Kuchin 9e4934cd0a change quotes using rubocop --only Style/StringLiterals,Style/QuotedSymbols -a 2024-03-20 18:05:22 +01:00
Christophe Bliard c795874f7f Update copyright year for 2024
command used: `rg -l 'Copyright \(C\) 2012-202\d the OpenProject' | xargs -n 100 sed -i -r 's/Copyright \(C\) 2012-202. the OpenProject/Copyright (C) 2012-2024 the OpenProject/'`
2024-01-02 16:23:54 +01:00
Christophe Bliard 21a696ef9b Update copyright information for 2023 2022-12-30 15:51:26 +01:00
Christophe Bliard 48a4f1b6ad lint with rubocop --autocorrect (safe cops only) 2022-06-02 10:40:10 +02:00
Christophe Bliard a33524ef6d remove ruby magic comment for utf-8
ruby interprets source encoding as utf-8 since 2.0.0, making magic comment redundant and useless
2022-03-10 19:36:58 +01:00
Christophe Bliard bc8d423ec2 update copyright information for 2022 2022-03-01 17:05:59 +01:00
Oliver Günther ccfa29c728 Move license and copyright docs to root, fix names and references 2021-09-02 21:50:46 +02:00
ulferts 1bdd2ab9ae safe automatic fixes by rubocop (#8994) 2021-02-11 16:02:18 +01:00
ulferts 6140f4c7e9 update copyright to 2021 (#8925)
Updates the copyright to 2021 for all files that have a copyright. Files in our source code without the copyright header still do not receive one automatically. Additionally, backlisted files are also excluded.

Previously the copyright of chiliproject which references redmine stated a copyright of redmine up to and including 2017 which is not true for the code we have in here. Because of that I changed that to 2013
2021-01-13 17:47:45 +01:00
ulferts 9e2287bfcc rename and inflect according to zeitwerk 2020-02-21 20:47:24 +01:00
Henriette Dinger bd7f4e4814 Update copyright notice 2020-01-15 11:31:26 +01:00
Oliver Günther a7ed2e9da0 Rewrite jobs to use ActiveJob syntax 2019-10-25 09:09:45 +02:00
Oliver Günther f86abae9eb Enforce Arel.sql for string order, pluck 2018-12-03 10:31:57 +01:00
Oliver Günther f2ceec1c78 Set DJ priorities and lower max attempts 2018-09-03 15:58:16 +02:00
Oliver Günther 6ef4211e77 Bump copyright to 2018 (#6171)
[ci skip]
2018-02-12 08:51:12 +01:00
ulferts c0b709530c Fix/replace deprecations (#5533)
* replace alias_method_chain

* remove deprecation silencing

* bump controller-testing

* introduce permitted params for settings

* replace various deprecations in controllers

* remove deprecation silencing for legacy_specs

* remove `puts` from spec

* replace deprecated access to errors

* remove unnecessary AR::Parameters usage in spec

* specify error to expect

* replace deprecations

* replace deprecated action calls in legacy function specs

* replace deprecations in functional controller tests

* replace deprecations in controllers/controller_specs

* remove params parser which does not seem to be in effect

It is registered for the content type :exclude which makes no sense as it should deal with :json. The desired behaviour of the api dealing with parsing errors is working with or without the code.

* replace deprecations in unit specs

* replace alias_method_chain

[ci skip]
2017-07-19 21:17:37 +02:00
Oliver Günther 7cf11bb689 Update copyright notice 2017-01-10 15:11:43 +01:00
Jens Ulferts 533cbdd033 formatting 2016-09-26 14:20:19 +02:00
Jens Ulferts 1d515c3e8d fix deprecation 2016-09-12 11:02:37 +02:00
Oliver Günther fe0e8dd919 Rename before_filter to before_action 2016-09-06 15:40:49 +02:00
Mohamed Wael Khobalatte 972b04d86e Refactor to allow for strong params
We no longer need attr_accessible.
2015-10-23 14:33:55 +02:00
Oliver Günther 319c728b1a Core notifications to alleviate third-party plugins
This commit provides some helpers to alleviate SCM vendor plugins:

 * Provide code notifications when project, members and users are changed.
 * Allow Repository:* to determine base URL themselves
   (when no common URL is available)
 * Open Git adapter for subclassing (Gitolite)
2015-10-07 10:50:30 +02:00
Oliver Günther c5a33fc4fa [ci skip] Remove reposman functionality.
This commit removes the functionality provided by reposman.rb,
and replaces that script with an empty placeholder printing only
a deprecation warning (as to not throw errors in existing cronjobs).

In detail, this commit does:

* replace reposman.rb with an script printing a deprecation only.
* Remove repositories creation API in SysController and corresponding
specs
* Update documentation guides concerning the deprecation of reposman
* Remove packager scripts for creating a reposman.rb cronjob.
* Adds a rake task to migrate repositories to managed type with a common
* URL prefix.
2015-10-06 16:16:26 +02:00
Oliver Günther 4889b8615c Merge pull request #3375 from oliverguenther/feature/git_smart_http
Feature/git smart http
2015-08-21 17:18:18 +02:00
Oliver Günther 14a394842d Extract SCM authorization routines into policies per vendor 2015-08-19 10:13:18 +02:00
Philipp Tessenow 373473c563 Add git support to repository authentication script
Refactors the original PR from #1629
* dispersed authorization methods in SysController
* refactored and updated SysController specs
2015-08-19 10:13:18 +02:00
Oliver Günther 0b583c3ccf Extend autofetching of commits into update repository information
This commit extends the previous functionality of *autofetch commits*
into internal updating of repository information, which encompasses:

* Commit information (changesets)
* Disk space information

They are now both retrieved when browsing the repository and the latter
is fetched asynchronously whenever the last update is older than the
timeout setting.

This timeout setting is now user-configurable.
2015-08-19 09:36:52 +02:00
Alex Coles e4c87bc2b4 Merge branch 'dev' into feature/rails4
Signed-off-by: Alex Coles <alex@alexbcoles.com>
2015-08-08 19:44:58 +01:00
Oliver Günther c16c1e75d4 Extend SysController to allow WS to check / update storage 2015-08-03 09:55:39 +02:00
Oliver Günther b0c0d0a53f Avoid fishy factory delegation. 2015-07-22 14:40:15 +02:00
Oliver Günther da27a552a1 Frontend extensions and build refactoring
- switched to toggleable-attribute-groups to provide means for
adding buttons in the attribute header (e.g., delete button).

- added separate destroy_info page with different notifications
for managed and linked repositories to ensure ramifications of removing
physical repositories are communicated to the user.

- Fixed several issues regarding scm_type selection and the building
  of repositories.

Open questions still concern the question of acessing unsupported
repositories (e.g., the soon-to-be-removed filesystem adapter).
Acessing the class should will then throw an error, but we still have
to allow users to remove the affected repository (somehow).
2015-07-22 14:40:15 +02:00
Oliver Günther 05b27c1b98 Asynchronous creation, deletion of repositories from OP.
This PR begins the push towards management of repository lifetime
from within OpenProject.

What this currently provides is the following:

  - A mixin `ManageableRepository`, included by `Repository::{Git,
      Subversion}` to provide an interface to repo management
  - Two services and delayed_job workers for creating (`CreateManagedRepositoryService`) and
  deleting (`DeleteRepositoryService`)
  - Customized rendering of subforms in the repository settings for
  arbitrary SCM vendors.

TODOS:
  - [x] Provide sane ground to work on ( cf. PR #3149 )
  - [x] Rework SCM settings form (`{scm}_tags` is currently HTML generated
        from within a Helper.)
  - [x] Ease integration of arbitrary SCM vendors
  - [x] Display meaningful error / warning when user looks at bare
  repository (currently outputs 500, as Git HEAD / svn revision is not
          available)
  - [x] I18n
  - [ ] Specs (in progress)
    - [x] Fix legacy specs
  - [ ] Decide what to do with `Filesystem` adapter.

Open Questions:

  - **Configuration**: Currently replaces the existing options in
  `configuration.yml`.
  - **Implementation specifics**:
    - Sub-projects repositories reside in a hierarchy below their parents
    - How should the delayed_job react upon failure? (esp. creation of
            repositories)

Relevant work package: https://community.openproject.org/work_packages/20416
Merge dependent on PR #3149
2015-07-22 14:40:14 +02:00
Alex Coles a3af19a8ff Indent fix in SysController for Rubocop
[ci skip]

Signed-off-by: Alex Coles <alex@alexbcoles.com>
2015-07-07 20:00:43 +02:00
Alex Coles 0ad3cfb4b2 Prefer do…end for controller respond_to blocks
`rubocop -a` does not currently normalise formatting consistently
(see ec1bb39f).

Signed-off-by: Alex Coles <alex@alexbcoles.com>
2015-07-07 19:44:22 +02:00
Alex Coles 0942d7335b Add explicit join references in controllers
Signed-off-by: Alex Coles <alex@alexbcoles.com>
2015-07-01 20:41:09 +02:00
Alex Coles e02eb0181d Migrate AR finder/query methods in controllers
Signed-off-by: Alex Coles <alex@alexbcoles.com>
2015-06-30 12:12:51 +02:00
Alex Coles ec1bb39f9b Fix syntax (w/Rubocop) in (Rails) controllers
Signed-off-by: Alex Coles <alex@alexbcoles.com>
2015-06-30 12:08:27 +02:00
Alex Coles 57618b25ec Replace dynamic finder usages with #find_by, etc.
This patch replaces all dynamic finders, for the sake of consistency,
although only some methods are deprecated. See:
https://github.com/rails/activerecord-deprecated_finders#active-record-deprecated-finders

* Revert some `User#find_by_login` usages in cuke steps accidentally
  removed in 74228b59.

User Story # 20325

Signed-off-by: Alex Coles <alex@alexbcoles.com>
2015-06-30 11:50:26 +02:00
Alex Coles e0191e759c Update year in copyright header to 2015
[ci skip]
2015-01-01 00:02:57 +00:00
Alex Coles bb0e6e6aa5 Fix syntax (w/Rubocop) in (Rails) controllers
Signed-off-by: Alex Coles <alex@alexbcoles.com>
2014-11-03 22:15:11 +01:00
Alex Coles 336446c59d Use 1.9+ Hash syntax in (Rails) controllers
Signed-off-by: Alex Coles <alex@alexbcoles.com>
2014-11-03 22:15:11 +01:00
Christian Ratz a452abc731 fixes repo auth
in sys controller
2014-08-14 11:50:58 +02:00