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

chore: Remove unused ACL fields on User entity #34634

Merged
merged 2 commits into from
Jul 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import java.time.Instant;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;

Expand Down Expand Up @@ -69,18 +68,6 @@ public class User extends BaseDomain implements UserDetails, OidcUser {
@JsonView(Views.Public.class)
private String examplesWorkspaceId;

// There is a many-to-many relationship with groups. If this value is modified, please also modify the list of
// users in that particular group document as well.
@JsonView(Views.Public.class)
private Set<String> groupIds = new HashSet<>();

// These permissions are in addition to the privileges provided by the groupIds. We can assign individual
// permissions
// to users instead of creating a group for them. To be used only for one-off permissions.
// During evaluation a union of the group permissions and user-specific permissions will take effect.
@JsonView(Views.Public.class)
private Set<String> permissions = new HashSet<>();

// This field is used when a user is invited to appsmith. This inviteToken is used to confirm the identity in verify
// token flow.
@JsonView(Views.Internal.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,8 @@ public Mono<UsagePulse> createPulse(UsagePulseDTO usagePulseDTO) {
}
usagePulse.setUser(hashedEmail);
updateUser.setLastActiveAt(Instant.now());
// Avoid updating the ACL fields
updateUser.setGroupIds(null);
// Avoid updating policies
updateUser.setPolicies(null);
updateUser.setPermissions(null);

return userService.updateWithoutPermission(user.getId(), updateUser).then(save(usagePulse));
});
Expand Down
Loading