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

Feat: #751 show all workspaces to admin #820

Merged
merged 88 commits into from
Feb 18, 2025

Conversation

marikaris
Copy link
Collaborator

@marikaris marikaris commented Dec 10, 2024

New PR because old one got tangled up with the docs PR for some reason.

how to test:

  • explain here what to do to test this (or point to unit tests)

todo:

  • Endpoint for displaying workspaces of all users
  • Save new workspaces in directory with user email, so we know which workspaces belong to what user
  • Upon saving workspace, check if workspaces available saved by uuid, if so copy them to folder with email address
  • Delete endpoint for workspaces from admin perspective
  • Load workspaces from new bucket directory
  • UI for displaying and deleting workspaces
  • Tests
  • See if it's possible to add file to new bucket if contents have been migrated

@marikaris
Copy link
Collaborator Author

Ran into this bug:
#821

The delete workspace endpoint has the same problem. I think this bug needs to be fixed in this PR as well.

@timcadman timcadman marked this pull request as ready for review January 24, 2025 12:55
@marikaris
Copy link
Collaborator Author

I'm suspecting the quality gate above is the right one, not the one in the "checks" part, as that one shows files that were not touched.

Copy link
Member

@mswertz mswertz left a comment

Choose a reason for hiding this comment

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

code looks good, jus small comments.
Will test now.

N.B. I understood file system doesn't care about special characters like umlauts. But you might need to address these? [- _ + ! # $ % & ' * / = ? ^ { | } ~] which as I understand are technically legal or at least confusing as they have special meanings.?

@@ -29,7 +28,8 @@ public void onApplicationEvent(@NotNull AbstractAuthenticationEvent event) {
private void onAuthenticationSuccessEvent(AuthenticationSuccessEvent event) {
publish(
new AuditEvent(
getUser(event.getAuthentication().getPrincipal()),
UserInformationRetriever.getUserIdentifierFromPrincipal(
Copy link
Member

Choose a reason for hiding this comment

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

waarom heb je deze nieuwe functie niet ook gewoon getUser genoemd? Dat had flink wat code changes verborgen ;-)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Goede vraag. Ga ik aanpassen haha

}

static String getUserBucketName(Principal principal) {
String userIdentifier = getUserIdentifierFromPrincipal(principal).replace("@", "__at__");
Copy link
Member

Choose a reason for hiding this comment

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

you tested against weird email adresses?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Probably not, I can add in some tests

@marikaris marikaris force-pushed the feat/#751-show-all-workspaces-to-admin branch from 087868c to 0efa460 Compare February 18, 2025 13:43
@marikaris marikaris merged commit 3333c12 into master Feb 18, 2025
4 checks passed
@marikaris marikaris deleted the feat/#751-show-all-workspaces-to-admin branch February 18, 2025 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants