public class AccessSecurityServiceImpl extends Object implements AccessSecurityService
AccessSecurityService
Modifier and Type | Field and Description |
---|---|
protected org.kuali.rice.core.api.config.property.ConfigurationService |
configurationService |
protected ContractsAndGrantsModuleService |
contractsAndGrantsModuleService |
protected org.kuali.rice.kns.service.DataDictionaryService |
dataDictionaryService |
protected org.kuali.rice.coreservice.framework.parameter.ParameterService |
parameterService |
Constructor and Description |
---|
AccessSecurityServiceImpl() |
Modifier and Type | Method and Description |
---|---|
void |
applySecurityRestrictions(List<? extends org.kuali.rice.krad.bo.BusinessObject> results,
org.kuali.rice.kim.api.identity.Person person,
org.kuali.rice.kim.api.common.template.Template permissionTemplate,
Map<String,String> additionalPermissionDetails)
Retrieves any setup security permissions for the given person and evaluates against List of business objects.
|
void |
applySecurityRestrictionsForGLInquiry(List<? extends org.kuali.rice.krad.bo.BusinessObject> results,
org.kuali.rice.kim.api.identity.Person person)
Retrieves any setup security permissions (with gl inquiry template) for the given person and evaluates against List of
business objects.
|
void |
applySecurityRestrictionsForLookup(List<? extends org.kuali.rice.krad.bo.BusinessObject> results,
org.kuali.rice.kim.api.identity.Person person)
Retrieves any setup security permissions (with lookup template) for the given person and evaluates against List of business
objects.
|
boolean |
canEditDocumentAccountingLine(AccountingDocument document,
AccountingLine accountingLine,
org.kuali.rice.kim.api.identity.Person person)
Checks any edit access security permissions setup for the user and for accounting lines of the given document type
|
boolean |
canEditDocumentAccountingLine(AccountingDocument document,
AccountingLine accountingLine,
org.kuali.rice.kim.api.identity.Person person,
AccessSecurityRestrictionInfo restrictionInfo)
Checks any edit access security permissions setup for the user and for accounting lines of the given document type
|
boolean |
canViewDocument(AccountingDocument document,
org.kuali.rice.kim.api.identity.Person person,
AccessSecurityRestrictionInfo restrictionInfo)
Checks view access on all accounting lines contained on the document for given user
|
boolean |
canViewDocumentAccountingLine(AccountingDocument document,
AccountingLine accountingLine,
org.kuali.rice.kim.api.identity.Person person)
Checks any view access security permissions setup for the user and for accounting lines of the given document type
|
boolean |
canViewDocumentNotesAttachments(AccountingDocument document,
org.kuali.rice.kim.api.identity.Person person)
Checks access is allowed to view document notes based on the document's accounting lines
|
boolean |
canViewGLPE(org.kuali.rice.krad.document.Document document,
GeneralLedgerPendingEntry pendingEntry,
org.kuali.rice.kim.api.identity.Person person)
Calls access security service to check view access on given GLPE for current user.
|
protected boolean |
checkForEditLineOverrides(AccountingDocument document,
AccountingLine line,
org.kuali.rice.kim.api.identity.Person person)
Checks parameter overrides for edit line permission.
|
protected boolean |
checkForViewDocumentOverrides(AccountingDocument document,
org.kuali.rice.kim.api.identity.Person person)
Checks parameter overrides for view document permission.
|
protected boolean |
checkForViewLineOverrides(AccountingDocument document,
AccountingLine line,
org.kuali.rice.kim.api.identity.Person person)
Checks parameter overrides for view line permission.
|
protected boolean |
checkForWorkflowRoutingRequests(AccountingDocument document,
org.kuali.rice.kim.api.identity.Person person)
Checks for any workflow requests (approve, acknowledge, fyi) for the document to the given person
|
void |
compareListSizeAndAddMessageIfChanged(int previousListSize,
List<?> results,
String messageKey)
Compares the size of the given list against the given previous size and if different adds an info message
|
protected AccessPermissionEvaluator |
constructAccessPermissionEvaluator(Class<? extends AccessPermissionEvaluator> accessPermissionEvaluatorClass,
Map<String,String> attributeSet,
Map<String,Object> otherKeyValues,
org.kuali.rice.kim.api.identity.Person person)
Constructs a new instance of the AccessPermissionEvaluator class and sets the constraint, operator, and value based on the
given qualification
|
protected boolean |
evaluateSecurityOnAccountingLinesByTemplate(AccountingDocument document,
org.kuali.rice.kim.api.identity.Person person,
org.kuali.rice.kim.api.common.template.Template permissionTemplate,
AccessSecurityRestrictionInfo restrictionInfo)
Iterates through source and target accounting lines for the given document and evaluates any permissions with the given
template id against the accounting line values
|
protected boolean |
evaluateSecurityPermissions(Class<? extends AccessPermissionEvaluator> accessPermissionEvaluatorClass,
List<org.kuali.rice.kim.api.permission.Permission> permissions,
String value,
org.kuali.rice.kim.api.identity.Person person,
Map<String,Object> otherKeyValues)
Checks whether the given value is allowed based on the given permissions and user
|
protected boolean |
evaluateSecurityPermissionsByTemplate(org.kuali.rice.krad.bo.BusinessObject businessObject,
Class entryClass,
org.kuali.rice.kim.api.identity.Person person,
org.kuali.rice.kim.api.common.template.Template permissionTemplate,
Map<String,String> additionalPermissionDetails,
AccessSecurityRestrictionInfo restrictionInfo)
Validates any security permissions setup for the user and attributes of the class against the business object values
|
Collection<String> |
getAccessSecurityControlledDocumentTypeNames()
Returns all the documents for which access security controls are in place.
|
protected Map<String,String> |
getDocumentTypeDetail(AccountingDocument document)
Constructs a new Map
|
org.kuali.rice.kim.api.common.template.Template |
getEditAccountingLineWithFieldValueTemplate()
Gets the Edit Accounting Line With Field Value Template Id.
|
org.kuali.rice.kim.api.common.template.Template |
getEditDocumentWithFieldValueTemplate()
Gets the Edit Document With Field Value Template Id.
|
org.kuali.rice.kim.api.common.template.Template |
getInquiryWithFieldValueTemplate()
Gets the Inquiry With Field Value Template Id.
|
org.kuali.rice.kim.api.common.template.Template |
getLookupWithFieldValueTemplate()
Gets the Lookup With Field Value Template Id.
|
org.kuali.rice.kim.api.permission.PermissionService |
getPermissionService() |
org.kuali.rice.kim.api.role.RoleService |
getRoleService() |
org.kuali.rice.kim.api.common.template.Template |
getViewAccountingLineWithFieldValueTemplate()
Gets the View Accounting Line With Field Value Template Id.
|
org.kuali.rice.kim.api.common.template.Template |
getViewDocumentWithFieldValueTemplate()
Gets the View Document With Field Values template ID.
|
org.kuali.rice.kim.api.common.template.Template |
getViewNotesAttachmentsWithFieldValueTemplate()
Gets the View Notes Attachments With Field Value Template Id.
|
boolean |
isAccessSecurityControlledDocumentType(String documentTypeName) |
protected boolean |
isAccessSecurityEnabled()
Helper method to check system parameter that turns access security on/off
|
void |
setConfigurationService(org.kuali.rice.core.api.config.property.ConfigurationService configurationService) |
void |
setContractsAndGrantsModuleService(ContractsAndGrantsModuleService contractsAndGrantsModuleService)
Sets the contractsAndGrantsModuleService attribute value.
|
void |
setDataDictionaryService(org.kuali.rice.kns.service.DataDictionaryService dataDictionaryService)
Sets the dataDictionaryService attribute value.
|
void |
setParameterService(org.kuali.rice.coreservice.framework.parameter.ParameterService parameterService)
Sets the parameterService attribute value.
|
protected org.kuali.rice.kns.service.DataDictionaryService dataDictionaryService
protected org.kuali.rice.coreservice.framework.parameter.ParameterService parameterService
protected ContractsAndGrantsModuleService contractsAndGrantsModuleService
protected org.kuali.rice.core.api.config.property.ConfigurationService configurationService
public AccessSecurityServiceImpl()
public void applySecurityRestrictionsForGLInquiry(List<? extends org.kuali.rice.krad.bo.BusinessObject> results, org.kuali.rice.kim.api.identity.Person person)
AccessSecurityService
applySecurityRestrictionsForGLInquiry
in interface AccessSecurityService
results
- List of business object instances with data to checkperson
- Person to apply security forAccessSecurityService.applySecurityRestrictionsForGLInquiry(java.util.List, org.kuali.rice.kim.api.identity.Person)
public void applySecurityRestrictionsForLookup(List<? extends org.kuali.rice.krad.bo.BusinessObject> results, org.kuali.rice.kim.api.identity.Person person)
AccessSecurityService
applySecurityRestrictionsForLookup
in interface AccessSecurityService
results
- List of business object instances with data to checkperson
- Person to apply security forAccessSecurityService.applySecurityRestrictionsForLookup(java.util.List, org.kuali.rice.kim.api.identity.Person)
public void applySecurityRestrictions(List<? extends org.kuali.rice.krad.bo.BusinessObject> results, org.kuali.rice.kim.api.identity.Person person, org.kuali.rice.kim.api.common.template.Template permissionTemplate, Map<String,String> additionalPermissionDetails)
applySecurityRestrictions
in interface AccessSecurityService
results
- List of business object instances with data to checkperson
- Person to apply security fortemplateId
- KIM template id for permissions to checkadditionalPermissionDetails
- Any additional details that should be matched on when retrieving permissionspublic boolean canEditDocumentAccountingLine(AccountingDocument document, AccountingLine accountingLine, org.kuali.rice.kim.api.identity.Person person, AccessSecurityRestrictionInfo restrictionInfo)
AccessSecurityService
canEditDocumentAccountingLine
in interface AccessSecurityService
document
- AccountingDocument instance that contains the line to be validated, doc type of instance is used for
retrieving permissionsaccountingLine
- AccountingLine instance with values to checkperson
- the user who we are checking access forrestrictionInfo
- Object providing information on a restriction if one is foundAccessSecurityService.canEditDocumentAccountingLine(org.kuali.ole.sys.document.AccountingDocument,
org.kuali.ole.sys.businessobject.AccountingLine, org.kuali.rice.kim.api.identity.Person,
org.kuali.ole.sec.businessobject.AccessSecurityRestrictionInfo)
public boolean canEditDocumentAccountingLine(AccountingDocument document, AccountingLine accountingLine, org.kuali.rice.kim.api.identity.Person person)
AccessSecurityService
canEditDocumentAccountingLine
in interface AccessSecurityService
document
- AccountingDocument instance that contains the line to be validated, doc type of instance is used for
retrieving permissionsaccountingLine
- AccountingLine instance with values to checkperson
- the user who we are checking access forAccessSecurityService.canEditDocumentAccountingLine(org.kuali.ole.sys.document.AccountingDocument,
org.kuali.ole.sys.businessobject.AccountingLine, org.kuali.rice.kim.api.identity.Person)
public boolean canViewDocument(AccountingDocument document, org.kuali.rice.kim.api.identity.Person person, AccessSecurityRestrictionInfo restrictionInfo)
AccessSecurityService
canViewDocument
in interface AccessSecurityService
document
- AccountingDocument instance with accounting lines to check, doc type of instance is used for retrieving
permissionsperson
- the user who we are checking access forrestrictionInfo
- Object providing information on a restriction if one is foundAccessSecurityService.canViewDocument(org.kuali.ole.sys.document.AccountingDocument,
org.kuali.rice.kim.api.identity.Person, org.kuali.ole.sec.businessobject.AccessSecurityRestrictionInfo)
public boolean canViewDocumentAccountingLine(AccountingDocument document, AccountingLine accountingLine, org.kuali.rice.kim.api.identity.Person person)
AccessSecurityService
canViewDocumentAccountingLine
in interface AccessSecurityService
document
- AccountingDocument that contains the line to be validated, doc type of instance is used for retrieving
permissionsaccountingLine
- AccountingLine instance with values to checkperson
- the user who we are checking access forAccessSecurityService.canViewDocumentAccountingLine(org.kuali.ole.sys.document.AccountingDocument,
org.kuali.ole.sys.businessobject.AccountingLine, org.kuali.rice.kim.api.identity.Person)
public boolean canViewDocumentNotesAttachments(AccountingDocument document, org.kuali.rice.kim.api.identity.Person person)
AccessSecurityService
canViewDocumentNotesAttachments
in interface AccessSecurityService
document
- AccountingDocument instance with accounting lines to check, doc type of instance is used for retrieving
permissionsperson
- the user who we are checking access forAccessSecurityService.canViewDocumentNotesAttachments(org.kuali.ole.sys.document.AccountingDocument,
org.kuali.rice.kim.api.identity.Person)
protected boolean evaluateSecurityOnAccountingLinesByTemplate(AccountingDocument document, org.kuali.rice.kim.api.identity.Person person, org.kuali.rice.kim.api.common.template.Template permissionTemplate, AccessSecurityRestrictionInfo restrictionInfo)
document
- AccountingDocument instance with accounting lines to check, doc type of instance is used for retrieving
permissionsperson
- the user who we are checking access fortemplateId
- KIM template id for the permissions to checkrestrictionInfo
- Object providing information on a restriction if one is foundprotected boolean checkForWorkflowRoutingRequests(AccountingDocument document, org.kuali.rice.kim.api.identity.Person person)
document
- Document to check for routing requestsperson
- Person to check for routing requestsprotected boolean checkForViewDocumentOverrides(AccountingDocument document, org.kuali.rice.kim.api.identity.Person person)
document
- Document that we are checking permissions forperson
- Person we are checking permissions forprotected boolean checkForViewLineOverrides(AccountingDocument document, AccountingLine line, org.kuali.rice.kim.api.identity.Person person)
document
- Document that we are checking permissions forperson
- Person we are checking permissions forline
- AccountingLine we are checking permissions forprotected boolean checkForEditLineOverrides(AccountingDocument document, AccountingLine line, org.kuali.rice.kim.api.identity.Person person)
document
- Document that we are checking permissions forperson
- Person we are checking permissions forline
- AccountingLine we are checking permissions forprotected boolean evaluateSecurityPermissionsByTemplate(org.kuali.rice.krad.bo.BusinessObject businessObject, Class entryClass, org.kuali.rice.kim.api.identity.Person person, org.kuali.rice.kim.api.common.template.Template permissionTemplate, Map<String,String> additionalPermissionDetails, AccessSecurityRestrictionInfo restrictionInfo)
businessObject
- instance with attribute values to validateentryClass
- Class of business object to pull attribute restrictions forperson
- the user who we are checking access fortemplateId
- type of security permissions to checkadditionalPermissionDetails
- any additional details that should be used for retrieving permissionsrestrictionInfo
- Object providing information on a restriction if one is foundprotected Map<String,String> getDocumentTypeDetail(AccountingDocument document)
document
- AccountingDocument instance which document type will be set fromprotected boolean evaluateSecurityPermissions(Class<? extends AccessPermissionEvaluator> accessPermissionEvaluatorClass, List<org.kuali.rice.kim.api.permission.Permission> permissions, String value, org.kuali.rice.kim.api.identity.Person person, Map<String,Object> otherKeyValues)
accessPermissionEvaluatorClass
- Class of type AccessPermissionEvaluator that will be used to evaluate the security
restrictionpermissions
- List of permissions to evaluatevalue
- the value that will be checkedperson
- the user who we are checking access forotherKeyValues
- Map for other key field name/value pairsprotected AccessPermissionEvaluator constructAccessPermissionEvaluator(Class<? extends AccessPermissionEvaluator> accessPermissionEvaluatorClass, Map<String,String> attributeSet, Map<String,Object> otherKeyValues, org.kuali.rice.kim.api.identity.Person person)
accessPermissionEvaluatorClass
- Class to create instance of (must implement AccessPermissionEvaluator interface)attributeSet
- MapotherKeyValues
- Map for other key field name/value pairsperson
- Person who permission should be evaluated forAccessPermissionEvaluator
protected boolean isAccessSecurityEnabled()
public void setDataDictionaryService(org.kuali.rice.kns.service.DataDictionaryService dataDictionaryService)
dataDictionaryService
- The dataDictionaryService to set.public void setParameterService(org.kuali.rice.coreservice.framework.parameter.ParameterService parameterService)
parameterService
- The parameterService to set.public void setConfigurationService(org.kuali.rice.core.api.config.property.ConfigurationService configurationService)
public org.kuali.rice.kim.api.permission.PermissionService getPermissionService()
public org.kuali.rice.kim.api.role.RoleService getRoleService()
public void setContractsAndGrantsModuleService(ContractsAndGrantsModuleService contractsAndGrantsModuleService)
contractsAndGrantsModuleService
- The contractsAndGrantsModuleService to set.public org.kuali.rice.kim.api.common.template.Template getEditAccountingLineWithFieldValueTemplate()
AccessSecurityService
getEditAccountingLineWithFieldValueTemplate
in interface AccessSecurityService
org.kuali.ole.sec.service.AccessSecurityService#getEditAccountingLineWithFieldValueTemplateId()
public org.kuali.rice.kim.api.common.template.Template getEditDocumentWithFieldValueTemplate()
AccessSecurityService
getEditDocumentWithFieldValueTemplate
in interface AccessSecurityService
org.kuali.ole.sec.service.AccessSecurityService#getEditDocumentWithFieldValueTemplateId()
public org.kuali.rice.kim.api.common.template.Template getInquiryWithFieldValueTemplate()
AccessSecurityService
getInquiryWithFieldValueTemplate
in interface AccessSecurityService
org.kuali.ole.sec.service.AccessSecurityService#getInquiryWithFieldValueTemplateId()
public org.kuali.rice.kim.api.common.template.Template getLookupWithFieldValueTemplate()
AccessSecurityService
getLookupWithFieldValueTemplate
in interface AccessSecurityService
org.kuali.ole.sec.service.AccessSecurityService#getLookupWithFieldValueTemplateId()
public org.kuali.rice.kim.api.common.template.Template getViewAccountingLineWithFieldValueTemplate()
AccessSecurityService
getViewAccountingLineWithFieldValueTemplate
in interface AccessSecurityService
org.kuali.ole.sec.service.AccessSecurityService#getViewAccountingLineWithFieldValueTemplateId()
public org.kuali.rice.kim.api.common.template.Template getViewDocumentWithFieldValueTemplate()
AccessSecurityService
getViewDocumentWithFieldValueTemplate
in interface AccessSecurityService
org.kuali.ole.sec.service.AccessSecurityService#getViewDocumentWithFieldValueTemplateId()
public org.kuali.rice.kim.api.common.template.Template getViewNotesAttachmentsWithFieldValueTemplate()
AccessSecurityService
getViewNotesAttachmentsWithFieldValueTemplate
in interface AccessSecurityService
org.kuali.ole.sec.service.AccessSecurityService#getViewNotesAttachmentsWithFieldValueTemplateId()
public boolean canViewGLPE(org.kuali.rice.krad.document.Document document, GeneralLedgerPendingEntry pendingEntry, org.kuali.rice.kim.api.identity.Person person)
canViewGLPE
in interface AccessSecurityService
pendingEntry
- GeneralLedgerPendingEntry to check access forpublic void compareListSizeAndAddMessageIfChanged(int previousListSize, List<?> results, String messageKey)
compareListSizeAndAddMessageIfChanged
in interface AccessSecurityService
previousListSize
- int giving previous size of list to compare toresults
- List to get size for and comparemessageKey
- String key of message that should be addedpublic Collection<String> getAccessSecurityControlledDocumentTypeNames()
AccessSecurityService
getAccessSecurityControlledDocumentTypeNames
in interface AccessSecurityService
public boolean isAccessSecurityControlledDocumentType(String documentTypeName)
isAccessSecurityControlledDocumentType
in interface AccessSecurityService
Copyright © 2004–2015 The Kuali Foundation. All rights reserved.