This error is intended for cases when a method is
intentionally not implemented, because the module/class defining
it expects a subclass (or class including the module) to implement
the method.
This is intended to distinguish it from other cases, such as:
* feature not implemented yet
* edge case of a method call not yet supported
Notably it avoids the misuse of the Ruby-defined NotImplementedError,
which is only intended for much more specific scenarios:
> Raised when a feature is not implemented on the current platform. For example, methods depending on the fsync or fork system calls may raise this exception [...]
Also see https://docs.ruby-lang.org/en/master/NotImplementedError.html
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`.
When calling a service with `send_notifications: false`, the
`Journal::NotificationConfiguration.active?` will be set to `false` and
subsequent calls to set it to `true` will have no effect and log a
warning.
For this reason, it's better to use `nil` as default value for
`send_notifications` so that
`Journal::NotificationConfiguration.active?` is changed only when the
value is explicitly `true` or `false`, and ignored when the value is
`nil`.
before, the email sent on group membership removal/ deletion was from Anonymous user. Now it is from the real user having performed the action in the administration
* include custom message in membership forms
* keep pristine params to be able to pass it to the state
* fix indentation on projects api docs
* pass grape instance around in default endpoints
The grape instance has readily available access to all the objects (params, current_user) so less individual parameters need to be passed. This also avoids having to store the grape endpoint in a potentials not thread safe variable
* send custom message out on membership creation
* send custom message on membership update
* send custom message even if setting disabled
* restore params interface
* add custom message description to schema
* describe notificationMessage in the api documentation
* extract meta payload functionality into mixin
* ensure password in spec meets requirements
* Update docs/api/apiv3/endpoints/members.apib
Co-authored-by: Oliver Günther <mail@oliverguenther.de>
* Update docs/api/apiv3/endpoints/members.apib
Co-authored-by: Oliver Günther <mail@oliverguenther.de>
* Update docs/api/apiv3/endpoints/members.apib
Co-authored-by: Oliver Günther <mail@oliverguenther.de>
* Update docs/api/apiv3/endpoints/members.apib
Co-authored-by: Oliver Günther <mail@oliverguenther.de>
* Update docs/api/apiv3/endpoints/members.apib
Co-authored-by: Oliver Günther <mail@oliverguenther.de>
Co-authored-by: Oliver Günther <mail@oliverguenther.de>
* 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>