Skip to content

OLMIS-8125: Added user roles import/export functionality#146

Merged
pwargulak merged 2 commits intomasterfrom
OLMIS-8125
Apr 3, 2025
Merged

OLMIS-8125: Added user roles import/export functionality#146
pwargulak merged 2 commits intomasterfrom
OLMIS-8125

Conversation

@druchniewicz
Copy link
Contributor

No description provided.

@druchniewicz druchniewicz marked this pull request as draft April 1, 2025 18:26
@sonarqubecloud
Copy link

sonarqubecloud bot commented Apr 2, 2025

@druchniewicz druchniewicz marked this pull request as ready for review April 2, 2025 12:27
Copy link
Contributor

@pwargulak pwargulak left a comment

Choose a reason for hiding this comment

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

No changes, just questions.

And one more question - did you export all roles from "demo startup" and import them again - how long it took?


@Column(name = "type", insertable = false, updatable = false)
@Getter
private String type;
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a migration script for this column?
Migration script to add the column to table, and set proper value for existing Role Assignments?

This field doesn't seem to be set in the RoleAssignment's Constructor?

OK, I'll leave this comment for documentation, but just noticed it is @DiscriminatorColumn

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, it's discriminator column, it's not a new column created by me

);
}

private List<List<RoleAssignmentImportDto>> splitRoleItems(
Copy link
Contributor

Choose a reason for hiding this comment

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

Just to understand - this split splits by users? So all role assignments for one user will always be in the same batch?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, exactly. To avoid unnecessary issues/redundant actions for the same user.

@pwargulak pwargulak merged commit 3201198 into master Apr 3, 2025
4 checks passed
@pwargulak pwargulak deleted the OLMIS-8125 branch April 3, 2025 15:57
@druchniewicz
Copy link
Contributor Author

No changes, just questions.

And one more question - did you export all roles from "demo startup" and import them again - how long it took?

yes, I tested it. 'Fresh' database (around 2k entries (users + role assignments)) export works instantly. Maximum data batch I have tested was ~4k users, ~10k role assignments (~14k entries in total) took around 3 secs.

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.

2 participants