Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EPMRPP-97027 user avatar #2111

Merged
merged 4 commits into from
Dec 3, 2024
Merged

EPMRPP-97027 user avatar #2111

merged 4 commits into from
Dec 3, 2024

Conversation

grabsefx
Copy link
Contributor

@grabsefx grabsefx commented Dec 2, 2024

  • renamed UserController -> UserControllerOld
  • all UserControllerOld endpoints base url switched to /v1/users/
  • implemented GET "/users/{user_id}/avatar" endpoint

@grabsefx grabsefx self-assigned this Dec 2, 2024
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;

@RestController
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [reviewdog] <com.puppycrawl.tools.checkstyle.checks.javadoc.MissingJavadocTypeCheck> reported by reviewdog 🐶
Missing a Javadoc comment.

@PreAuthorize(IS_ADMIN)
@Operation(summary = "Exports information about all users", description = "Allowable only for users with administrator role")
public void export(@Parameter(schema = @Schema(allowableValues = "csv"))
@RequestParam(value = "view", required = false, defaultValue = "csv") String view,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [reviewdog] <com.puppycrawl.tools.checkstyle.checks.indentation.IndentationCheck> reported by reviewdog 🐶
'@' has incorrect indentation level 2, expected level should be 6.

@PostMapping(value = "/{userId}/api-keys")
@ResponseStatus(CREATED)
@Operation(summary = "Create new Api Key for current user")
public ApiKeyRS createApiKey(@RequestBody @Validated ApiKeyRQ apiKeyRQ,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [reviewdog] <com.puppycrawl.tools.checkstyle.checks.naming.AbbreviationAsWordInNameCheck> reported by reviewdog 🐶
Abbreviation in name 'apiKeyRQ' must contain no more than '1' consecutive capital letters.

@@ -44,6 +44,8 @@ private Permissions() {
public static final String ALLOWED_TO_VIEW_PROJECT =
"hasPermission(#projectKey.toLowerCase(), 'allowedToViewProject')" + "||" + IS_ADMIN;

public static final String AUTHENTICATED = IS_ADMIN + "||" + "hasPermission(#userId, 'authenticated')";
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [reviewdog] <com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck> reported by reviewdog 🐶
Line is longer than 100 characters (found 105).

import org.springframework.security.core.Authentication;
import org.springframework.stereotype.Component;

@Component("authenticatedUserPermission")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [reviewdog] <com.puppycrawl.tools.checkstyle.checks.javadoc.MissingJavadocTypeCheck> reported by reviewdog 🐶
Missing a Javadoc comment.

@@ -34,6 +34,15 @@ public interface GetFileHandler {
*/
BinaryData getUserPhoto(ReportPortalUser loggedInUser, boolean loadThumbnail);

/**
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [reviewdog] <com.puppycrawl.tools.checkstyle.checks.javadoc.SummaryJavadocCheck> reported by reviewdog 🐶
First sentence of Javadoc is missing an ending period.

import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;

@RestController
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need mark this controller as depricated?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For now only 2 methods marked for removal

@grabsefx grabsefx merged commit 9421a38 into feature/orgs Dec 3, 2024
8 checks passed
@grabsefx grabsefx deleted the EPMRPP-97027-user-avatar branch December 3, 2024 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants