-
Notifications
You must be signed in to change notification settings - Fork 5
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
Conversation
There was a problem hiding this 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!
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<>(); | ||
|
||
} |
There was a problem hiding this comment.
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(); |
There was a problem hiding this comment.
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();
Hello @yvanhenang please read again the ticket description for more insight |
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