19 Commits

Author SHA1 Message Date
Alexander Brandon Coles 5e9f3827f5 Freeze string literals in app/services
rubocop -A --only Style/FrozenStringLiteralComment,Layout/EmptyLineAfterMagicComment,Style/RedundantFreeze app/services
2025-07-18 17:45:24 +01:00
Jan Sandbrink 40aff02f11 Remove params argument from BaseCallable#perform
This is making the interface of BaseCallable more consistent.
Previously it was unclear, whether the params passed to perform
should be used to reference parameters or whether the attribute accessor
should be used. Different code used different approaches.

To apply this change more consistently, BaseContracted also removed
params from the methods called inside its own perform method, e.g.
before_perform or after_validate.

At a later point we might consider removing this argument from other large
inheritors as well, for example `BaseServices::SetAttributes#set_attributes`.
2025-06-30 11:47:03 +02:00
Ivan Kuchin 4911b8a149 remove years from copyrights (except for COPYRIGHT file) 2024-07-31 15:02:49 +02:00
Ivan Kuchin 192e21cd9e manual rubocop corrections 2024-05-30 19:54:08 +02:00
Ivan Kuchin fa5d03eae0 rubocop safe autocorrect all except Rails/WhereRange 2024-05-30 19:54:08 +02: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 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 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
Oliver Günther 2271b79fc6 Correctly base all services on base_contracted with a model
BaseContracted service uses a `model` reference that it doesn't define
itself, neither does some of the dependent services.

To avoid this, make sure the BaseContracted gets an optional model
attribute that can be set.
2020-07-10 15:41:04 +02:00
ulferts a895767619 have a delete service for attachments 2020-03-02 15:49:31 +01:00
Henriette Dinger bd7f4e4814 Update copyright notice 2020-01-15 11:31:26 +01:00
Henriette Dinger 69debf8c0c Add Bcf Topic DeleteService and DeleteEndpoint 2019-11-22 15:31:54 +01:00
ulferts bbd058d536 extend interface on all base services 2019-10-31 12:05:16 +01:00
ulferts 3dabb46dd9 allow copying projects without parent project reference 2019-10-31 11:23:04 +01:00
ulferts 05ac3af1ee add projects delete end point to api 2019-09-19 07:34:50 +02:00
ulferts a93ecca5a8 Feature/members api show (#7308)
* basic members collection response

* complete member index end point

* document versions#index

* remove user association from members

There is already a more generic principals association. Having both causes confusion and leads to duplicate loading of models

* linting

* remove disabled test

* add members#show api end point

* add project and principal to member representer

* replace member.user reference with principal

* use principal reference in project members association

* modernize roles api

* complete member representer rendering

* replace remnants of user association

* add member schema api endpoint

* have dedicated available projects end point for versions

* linting

* limit roles to assignable ones in schema

* rename member to membership in api

* remove remnants of user in member

* spec fixes

* use available_projects endpoint in versions board

* add eager loading to memberships#index

* members create form api endpoint

* ensure role exists for default assignment

* extract switch for users/groups to work_packages representer

* document membership create form

* add l10n expected in specs

* strengthen the usage of a delete base service

* use base class for set attributes service

* fix alias in service

* add create endpoint to members api

* document members create endpoint

* linting

* adapt to altered service signature

* use default endpoint for wp#get

* use CF infused representer


[ci skip]
2019-05-29 09:31:56 +03:00