ca.gc.aafc.dina.security.auth.ObjectOwnerAuthorizationService Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dina-base-api Show documentation
Show all versions of dina-base-api Show documentation
Base DINA API package for Java built on SpringBoot and Crnk
The newest version!
package ca.gc.aafc.dina.security.auth;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.stereotype.Service;
@Service
public class ObjectOwnerAuthorizationService extends PermissionAuthorizationService {
@Override
@PreAuthorize("hasObjectOwnership(@currentUser, #entity)")
public void authorizeCreate(Object entity) {
}
@Override
public void authorizeRead(Object entity) {
}
@Override
@PreAuthorize("hasObjectOwnership(@currentUser, #entity)")
public void authorizeUpdate(Object entity) {
}
@Override
@PreAuthorize("hasObjectOwnership(@currentUser, #entity)")
public void authorizeDelete(Object entity) {
}
@Override
public String getName() {
return "ObjectOwnerAuthorizationService";
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy