You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use Generics in the interface to set the type of the parameters rather than using the Object class.
Currently for PermissionEvaluator method
boolean hasPermission(Authentication authentication, Object targetDomainObject, Object permission)
Would or should become
interface PermissionEvaluator <S, TDO, P>
boolean hasPermission(Authentication authentication, S targetId , String targetType, P permission);
boolean hasPermission(Authentication authentication, TDO targetDomainObject, P permission);
This alleviates the need for casting and type un safety, by setting and knowing the types of data ahead of time.
The text was updated successfully, but these errors were encountered:
Use Generics in the interface to set the type of the parameters rather than using the Object class.
Currently for PermissionEvaluator method
boolean hasPermission(Authentication authentication, Object targetDomainObject, Object permission)
Would or should become
interface PermissionEvaluator <S, TDO, P>
boolean hasPermission(Authentication authentication, S targetId , String targetType, P permission);
boolean hasPermission(Authentication authentication, TDO targetDomainObject, P permission);
This alleviates the need for casting and type un safety, by setting and knowing the types of data ahead of time.
The text was updated successfully, but these errors were encountered: