Skip to content
Merged
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
12 changes: 0 additions & 12 deletions src/main/java/org/example/vet1177/policy/ActivityLogPolicy.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,6 @@ public void canView(User user, ActivityLog log){
}
}

// CREATE
public void canCreate(User user){

if (user == null || user.getRole() == null) {
throw new ForbiddenException(ADMIN_ONLY_MSG);
}

switch (user.getRole()){
case ADMIN -> {}
default -> throw new ForbiddenException(ADMIN_ONLY_MSG);
}
}

public void canUpdate(){
throw new ForbiddenException("Activity logs kan inte uppdateras");
Expand Down