This cleans up the readability of the spec given it's used in multiple
contexts. Easier to parse when you can refer directly from the caller
you're trying to inspect.
* Fix argument alignment since f08bea3467
The FactoryBot.* prefix has been removed in f08bea3467. Since then
rubocop complains about Layout/ArgumentAlignment. This commit fixes it.
* do not fix alignments for modules/*/spec yet
hoping to be under the limit of 65535 characters for reviewdog to report on rubocop errors
* spec with correctly scoped links
* move db check into own file - fix deprecation
* basic spec for member creation service
* use constants for all notifications
* send an OP notification after member has been created
* send an OP notification after member has been updated
* mails on group member added
Depending on whether the membership existed before or not, an updated or
a created notification is send. This is done asynchronously.
* move all mail sender background jobs into namespace
* wip
* wip
* correct handling group member notifications
* add setting enable/disable mail sending on member alterations
* use services in members controller
* move Notifiable to OpenProject
* remove member after save hooks
* cleanup/testing/linting
* render member mails in receiver locale
* remove add_member! method
* use mailer layout for all mailers
* Update app/services/groups/cleanup_inherited_roles_service.rb
Co-authored-by: Oliver Günther <mail@oliverguenther.de>
* use around callback to avoid prepending
* handle nil params
Co-authored-by: Oliver Günther <mail@oliverguenther.de>
* remove intermediate placeholder scope
Doing so, placeholder users will begin to show up in the system
* remove scope without value
* extract scope
* use enum for status
* allow placeholder users to become project members
* display placeholder user member on members widget
* remove now superfluous method
The status name can simply be queried via #status now
* replace possible_assignees/responsibles on project
This also leads to placeholder users becoming eligible as assignees and
responsibles.
* fix aggregated scope on bulk edit
* linting
* remove IssueHelper
* Add missing copyright note to AnonymousUser [ci skip]
* Addin PlaceholderUser model and its associations
* Ensure PlaceholderUser do not "leak out" uncontrolled
* Extract Associations for User and PlaceholderUser.
- remove obsolete #assigned_issues
- remove obsoete #:responsible_for_issues
- add specs and factory for PlaceholderUser
Adding specs to PlaceholderModel
* Migration: enforce uniqueness of lastname for Group and PlaceholderUser
* Remove obsolete callback `after_add` on groups association.
The association of principals and groups still had a callback
`after_add` that called a method `user_added` on the group.
That method was not defined anymore as it was removed in
commit d93ff52a27.
* Move validation for #groupname to the right spec.
* Cleanup placeholder and group specs
* Remove Setting `workpackage_group_assignment`
* Refactoring: Extract assignable scope from Project to Member
* Refactor: Add Member scope not_locked.
* deprecate hacky scope
* remove wp_group_assignment specific test case
Co-authored-by: ulferts <jens.ulferts@googlemail.com>
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
Reduces the amount of AR models instantiated when handing wp#index
requests by:
* Calculating part of the checksum for caching in the db. This is done
by using the id and the updated_at/on field of associated models whose
representation is cached in the wp representer.
* Reusing instantiated models for multiple associations. e.g instances
of Project are used in various places (the work package itself, it's
ancestors and children). Instead of using Rails' eager loading which
would instantiate a project potentially once for every association path,
the code now assigns the same instance to all those associations.
Additionally, the commit streamlines the creation of custom field
injected representers. Now only one class is created for all work
packages when before it would be one class for every uniq set of custom
fields. On top of that, the class can be reused if the set of custom
fields does not change.