ca.gc.aafc.dina.security.auth.AllowAllAuthorizationService 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
package ca.gc.aafc.dina.security.auth;
import java.util.Set;
import ca.gc.aafc.dina.security.spring.SecurityChecker;
/**
* Authorization service that allows all operations.
*/
public class AllowAllAuthorizationService implements DinaAuthorizationService {
@Override
public void authorizeCreate(Object entity) {
// do nothing
}
@Override
public void authorizeRead(Object entity) {
// do nothing
}
@Override
public void authorizeUpdate(Object entity) {
// do nothing
}
@Override
public void authorizeDelete(Object entity) {
// do nothing
}
@Override
public Set getPermissionsForObject(Object target) {
return Set.of(
SecurityChecker.Operations.CREATE.getValue(),
SecurityChecker.Operations.READ.getValue(),
SecurityChecker.Operations.DELETE.getValue(),
SecurityChecker.Operations.UPDATE.getValue()
);
}
@Override
public String getName() {
return "AllowAllAuthorizationService";
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy