public class PolicyHelper extends Object
| Modifier and Type | Method and Description |
|---|---|
static boolean |
isAuthorizedAsExpected(javax.servlet.http.HttpServletRequest req,
org.apache.jena.rdf.model.Model additions,
org.apache.jena.rdf.model.Model retractions,
org.apache.jena.ontology.OntModel modelBeingModified)
Do the current policies authorize the current user to modify this model
by adding all of the statments in the additions model and dropping all of
the statements in the retractions model?
This differs from the other calls to "isAuthorized..." because we always
expect the answer to be true.
|
static boolean |
isAuthorizedForActions(javax.servlet.http.HttpServletRequest req,
AuthorizationRequest... actions)
Are these actions authorized for the current user by the current
policies?
|
static boolean |
isAuthorizedForActions(javax.servlet.http.HttpServletRequest req,
Iterable<? extends AuthorizationRequest> actions)
Are these actions authorized for the current user by the current
policies?
|
static boolean |
isAuthorizedForActions(javax.servlet.http.HttpServletRequest req,
String email,
String password,
AuthorizationRequest ar)
Is the email/password authorized for these actions? This should be used
when a controller or something needs allow actions if the user passes in
their email and password.
|
static boolean |
isAuthorizedForActions(IdentifierBundle ids,
PolicyIface policy,
AuthorizationRequest ar)
Are these actions authorized for these identifiers by these policies?
|
static boolean |
isAuthorizedToAdd(javax.servlet.http.HttpServletRequest req,
org.apache.jena.rdf.model.Statement stmt,
org.apache.jena.ontology.OntModel modelToBeModified)
Do the current policies authorize the current user to add this statement
to this model?
The statement is expected to be fully-populated, with no null fields.
|
static boolean |
isAuthorizedToDrop(javax.servlet.http.HttpServletRequest req,
org.apache.jena.rdf.model.Statement stmt,
org.apache.jena.ontology.OntModel modelToBeModified)
Do the current policies authorize the current user to drop this statement
from this model?
The statement is expected to be fully-populated, with no null fields.
|
public static boolean isAuthorizedForActions(javax.servlet.http.HttpServletRequest req,
AuthorizationRequest... actions)
public static boolean isAuthorizedForActions(javax.servlet.http.HttpServletRequest req,
Iterable<? extends AuthorizationRequest> actions)
public static boolean isAuthorizedForActions(IdentifierBundle ids, PolicyIface policy, AuthorizationRequest ar)
public static boolean isAuthorizedForActions(javax.servlet.http.HttpServletRequest req,
String email,
String password,
AuthorizationRequest ar)
public static boolean isAuthorizedToAdd(javax.servlet.http.HttpServletRequest req,
org.apache.jena.rdf.model.Statement stmt,
org.apache.jena.ontology.OntModel modelToBeModified)
public static boolean isAuthorizedToDrop(javax.servlet.http.HttpServletRequest req,
org.apache.jena.rdf.model.Statement stmt,
org.apache.jena.ontology.OntModel modelToBeModified)
public static boolean isAuthorizedAsExpected(javax.servlet.http.HttpServletRequest req,
org.apache.jena.rdf.model.Model additions,
org.apache.jena.rdf.model.Model retractions,
org.apache.jena.ontology.OntModel modelBeingModified)
Copyright © 2021. All rights reserved.