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:update manageraccess entity #35

Closed
wants to merge 1 commit into from
Closed

Conversation

yvanhenang
Copy link
Contributor

Updated the pom.xml to manage dependencies for access management functionality. Enhanced AccessScope and ManagerAccess domain models to refine permissions and scope definitions. Added integration tests in ManagerAccessRepositoryIT to ensure proper functionality of manager-level access features

Copy link
Contributor

@Koufan-De-King Koufan-De-King left a comment

Choose a reason for hiding this comment

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

Looks good to me!

Comment on lines +1 to +37
package de.adorsys.ledgers.baam.db.domain;

import jakarta.persistence.*;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;


import java.util.HashSet;
import java.util.Set;
import java.util.UUID;

@Entity
@Data
@NoArgsConstructor
@AllArgsConstructor
public class ManagerAccess {

@Id
@GeneratedValue(strategy = GenerationType.UUID)
private UUID id;

private String name;


private double weight; // Level of access (0 to 1)

@Enumerated(EnumType.STRING)
private AccessStatus status;

@ElementCollection
private Set<TypeOfManagedAccess> managedAccessTypes = new HashSet<>();

@ElementCollection
private Set<AccessScope> scopeOfAccess = new HashSet<>();

}
Copy link
Contributor

Choose a reason for hiding this comment

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

Good job @yvanhenang

but to make these clear, i think you should extend your class to the BankAccountAcess entity.

let's use inheritance as the BankAccountAcess entity serves as an entery point to all accesses

@BeforeEach
public void setup() {
// Initialize a ManagerAccess object for testing
managerAccess = new ManagerAccess();
Copy link
Contributor

Choose a reason for hiding this comment

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

These is correct but not a good practice for our case..

it should be ManagerAcess managerAccess = new ManagerAccess(); and not managerAccess = new ManagerAccess();

@NkwaTambe
Copy link
Contributor

Hello @yvanhenang please read again the ticket description for more insight

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