Skip to content

Check/Update author roles when adding changing authors #46

@mhinkie

Description

@mhinkie

Is your feature request related to a problem? Please describe.
When adding or deleting authors of issues, the author roles are not properly updated in the API.
This has already been fixed for the case of adding new authors (see saveCandidateAuthor in CandidateServiceImpl) but it has to be checked if there need to be changes to other functions (e.g. delete functions) aswell. In the cases examined until now, the author is
saved correctly (using e.g. CandidateAuthorRepository), but the associated roles are not updated.

Describe the solution you'd like
If an author is added to any resource (Issue, Candidate, ...) the corresponding roles have to be added or deleted for that author.
The requested role is usually provided in the associated AuthorModelRequest. Using roleService.findAllFromEntityForAuthorType it
is possible to obtain the entitiy specific author roles (e.g. MAINTAINER_ISSUE_ef812941-c173-4f9f-8cc1-6cb4f8d9d77b) which can
then be updated by chaning the roles in the associated UserEntity and saving it.

To do:

  • Find all service function that update authors for all resources
  • Evaluate if this change needs to be made for this function or if it is already functioning properly
  • Implement changes

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-reviewFix / feature is ready to be reviewed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions