48 Commits

Author SHA1 Message Date
Ivan Kuchin 4911b8a149 remove years from copyrights (except for COPYRIGHT file) 2024-07-31 15:02:49 +02:00
Dombi Attila 89ce735d23 Merge branch 'dev' into epic/49688-custom-set-of-project-attributes-grouped-in-sections 2024-03-19 20:42:54 +02:00
Oliver Günther 4ba81fd242 Allow previewing on meeting contents 2024-03-13 12:30:14 +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 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
Henriette Dinger bd7f4e4814 Update copyright notice 2020-01-15 11:31:26 +01:00
Oliver Günther 1b5fc32366 Avoid before blocks and raw params access for IDs
Grape's validation runs after a `before` block so we should avoid using
raw params there and instead using `declared(params)` which returns only
the validated whitelisted params, much like a permitted params hash.
2019-05-22 09:34:17 +02:00
Oliver Günther ca215d36da Avoid warning spewing for api consts
/home/oliver/openproject/dev/lib/api/v3/render/render_api.rb:39: warning: already initialized constant API::V3::Render::RenderAPI::SUPPORTED_CONTEXT_NAMESPACES
/home/oliver/openproject/dev/lib/api/v3/render/render_api.rb:39: warning: previous definition of SUPPORTED_CONTEXT_NAMESPACES was here
/home/oliver/openproject/dev/lib/api/v3/render/render_api.rb:40: warning: already initialized constant API::V3::Render::RenderAPI::SUPPORTED_MEDIA_TYPE
/home/oliver/openproject/dev/lib/api/v3/render/render_api.rb:40: warning: previous definition of SUPPORTED_MEDIA_TYPE was here
/home/oliver/openproject/dev/lib/api/v3/render/render_api.rb:39: warning: already initialized constant API::V3::Render::RenderAPI::SUPPORTED_CONTEXT_NAMESPACES
/home/oliver/openproject/dev/lib/api/v3/render/render_api.rb:39: warning: previous definition of SUPPORTED_CONTEXT_NAMESPACES was here
/home/oliver/openproject/dev/lib/api/v3/render/render_api.rb:40: warning: already initialized constant API::V3::Render::RenderAPI::SUPPORTED_MEDIA_TYPE
/home/oliver/openproject/dev/lib/api/v3/render/render_api.rb:40: warning: previous definition of SUPPORTED_MEDIA_TYPE was here
2019-02-14 09:00:32 +01:00
Jens Ulferts cc7f257caa fix context links used for previewing 2018-07-20 12:43:49 +02:00
Jens Ulferts 97ad5e0008 reenable previews 2018-07-17 12:14:52 +02:00
Jens Ulferts 319f33e924 remove textile 2018-07-17 12:14:51 +02:00
Oliver Günther 0cebd23863 Switchable markdown setting 2018-02-12 15:38:05 +01:00
Oliver Günther 6ef4211e77 Bump copyright to 2018 (#6171)
[ci skip]
2018-02-12 08:51:12 +01:00
Oliver Günther ac389b869d Fix other request specs by adding json header 2017-10-18 10:14:01 +02:00
Oliver Günther cf55f61e73 Don't register textile formatters in initializer (#5903)
When the autoloader reloads WikiFormatting, the values registered in the
initializer are lost

[ci skip]
2017-09-06 12:51:47 +02:00
Oliver Günther 7cf11bb689 Update copyright notice 2017-01-10 15:11:43 +01:00
Alexander Bach 98f873a3b8 Accept projects as render context 2015-06-11 09:05:56 +02:00
Jan Sandbrink f50ad955b7 more namespace qualification 2015-03-25 14:17:29 +01:00
Jan Sandbrink f63d5e6d2e use partial namespace prefixes where neccessary
apparently using Rails leads to people (like me) not learning how Ruby actually looks up Constants.

We need to provide the prefix whenever the Constant can't be found in our scope or a parent scope.
2015-03-25 14:17:29 +01:00
Jan Sandbrink b1ba33c75b specify classes explicitly rather than implicitly
This is a new try for the APIv3 classes, we either:
- FULLY qualify a class and let the autoloader do the rest
- don't qualify at all, but require the class explicitly

Thus we do not (yet) completely give up on the rails autoloader,
but we circumvent a fair amount of its magic (and problems).

The hope is to eliminate the following problems in development mode:
- NameErrors because the autoloader infers the wrong prefix
- "object is not missing constant" errors occuring more rarely

Let's see how that turns out to work...
2015-03-25 14:17:28 +01:00
Florian Kraft 09d0605fc9 Merge pull request #2733 from NobodysNightmare/feature/api_error_handling
[API] Ensure correct Content-Type for error responses
2015-03-24 14:01:33 +01:00
Jan Sandbrink b0ba1764f3 improve context-related error messages 2015-03-23 11:32:08 +01:00
Jan Sandbrink f0863f9d53 allow to patch existing API endpoints 2015-03-18 16:26:15 +01:00
Jan Sandbrink 03c6fcdf6f rewrite ResourceLinkParser
- use own RegExp instead of borrowing the ones from Grape routes
- add specs
2015-02-26 11:18:50 +01:00
Jan Sandbrink dd67b3bf8e hide the real name of the plain format 2015-02-20 13:58:29 +01:00
Jan Sandbrink 7eed4f8f62 style 2015-02-20 11:59:29 +01:00
Jan Sandbrink 3b45954314 HTTP 415 is even more apropriate than HTTP 400 2015-02-20 11:59:29 +01:00
Jan Sandbrink 7bfd3e3325 don't crash on missing content type
400 is more apropriate than 500
2015-02-20 11:59:29 +01:00
Jan Sandbrink 0f1a7f94e2 generalize the render endpoints 2015-02-20 11:59:28 +01:00
Alex Coles e0191e759c Update year in copyright header to 2015
[ci skip]
2015-01-01 00:02:57 +00:00
Hagen Schink fd7355f2b1 Match resource links against API root
The API V3 routes tend to forget about their prefix ('api'). Manual tests showed
that the API root routes reliably set their prefix.
2014-12-11 17:16:25 +01:00
Hagen Schink f7e6a6c430 Localize error messages in API V3 2014-12-04 08:17:01 +01:00
Hagen Schink 6fae710043 Implement render plain endpoint for API V3 2014-12-01 08:22:26 +01:00
Hagen Schink c463c52ab7 Textile endpoint renders 400 on invalid content type 2014-12-01 08:22:26 +01:00
Jens Ulferts 81e280c78f encodes body in provided charset 2014-11-14 10:17:57 +01:00
Hagen Schink 6b739ea634 Remove empty 'else' block 2014-11-10 15:08:15 +01:00
Hagen Schink 17fe7fe9c0 Make error handling more readable 2014-11-10 15:05:24 +01:00
Hagen Schink 1dd819e2a3 Remove redundant begin block 2014-11-07 14:03:41 +01:00
Hagen Schink 16bd488e1e Make helper classes modules 2014-11-07 13:21:08 +01:00
Hagen Schink cb9dc86a69 Improve handling of non-existing render contexts 2014-11-07 12:37:07 +01:00
Hagen Schink 487970944d Remove superfluous dependency 2014-11-07 08:13:03 +01:00
Hagen Schink af8a81ded8 Extract resource link parsing 2014-11-07 08:13:02 +01:00
Hagen Schink 8bf6749cfd Implement API V3 textile render endpoint 2014-11-05 08:11:57 +01:00