mirror of
https://github.com/OtusTeam/Spring.git
synced 2026-05-30 10:50:42 +00:00
Долг по SPeL к занятию 23
This commit is contained in:
@@ -6,7 +6,7 @@ import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class MyService {
|
||||
@PreAuthorize("hasRole('ROLE_USER')")
|
||||
@PreAuthorize("hasRole('ROLE_USER') && {new java.util.Random().nextInt()%2 == 0}")
|
||||
public String onlyUser() {
|
||||
return "My love";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user