public class DocumentViewAuthorizerBase extends ViewAuthorizerBase implements DocumentAuthorizer
ViewAuthorizer for
DocumentView instances
Performs KIM permission checks for the various document actions such as save, approve, cancel
By default delegates to the DocumentAuthorizer configured for the document in the data dictionary
| Modifier and Type | Field and Description |
|---|---|
protected static org.apache.commons.logging.Log |
LOG |
static String |
PRE_ROUTING_ROUTE_NAME |
| Constructor and Description |
|---|
DocumentViewAuthorizerBase() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addPermissionDetails(Object dataObject,
Map<String,String> attributes)
Override this method to populate the permission details from the primary
data object or document.
|
protected void |
addRoleQualification(Object dataObject,
Map<String,String> attributes)
Override this method to populate the role qualifier attributes from the
primary data object or document.
|
protected void |
addStandardAttributes(Document document,
Map<String,String> attributes) |
boolean |
canAcknowledge(Document document,
Person user) |
boolean |
canAddNoteAttachment(Document document,
String attachmentTypeCode,
Person user) |
boolean |
canAnnotate(Document document,
Person user) |
boolean |
canApprove(Document document,
Person user) |
boolean |
canBlanketApprove(Document document,
Person user) |
boolean |
canCancel(Document document,
Person user) |
boolean |
canClose(Document document,
Person user) |
boolean |
canCopy(Document document,
Person user) |
boolean |
canDeleteNoteAttachment(Document document,
String attachmentTypeCode,
String authorUniversalIdentifier,
Person user) |
boolean |
canDisapprove(Document document,
Person user) |
boolean |
canEdit(Document document,
Person user) |
boolean |
canEditDocumentOverview(Document document,
Person user) |
boolean |
canEditView(View view,
ViewModel model,
Person user)
Checks for an edit view permission for the view id, and if found verifies the user has that permission
|
boolean |
canFyi(Document document,
Person user) |
boolean |
canInitiate(String documentTypeName,
Person user) |
boolean |
canOpen(Document document,
Person user) |
boolean |
canOpenView(View view,
ViewModel model,
Person user)
Checks for an open view permission for the view id, and if found verifies the user has that permission
|
boolean |
canPerformRouteReport(Document document,
Person user) |
boolean |
canRecall(Document document,
Person user) |
boolean |
canReceiveAdHoc(Document document,
Person user,
String actionRequestCode) |
boolean |
canReload(Document document,
Person user) |
boolean |
canRoute(Document document,
Person user) |
boolean |
canSave(Document document,
Person user) |
boolean |
canSendAdHocRequests(Document document,
String actionRequestCd,
Person user) |
boolean |
canSendAnyTypeAdHocRequests(Document document,
Person user) |
boolean |
canSendNoteFyi(Document document,
Person user) |
boolean |
canTakeRequestedAction(Document document,
String actionRequestCode,
Person user) |
boolean |
canViewNoteAttachment(Document document,
String attachmentTypeCode,
String authorUniversalIdentifier,
Person user) |
Set<String> |
getActionFlags(View view,
ViewModel model,
Person user,
Set<String> actions)
Returns the set of action flags that are authorized for the given user
|
DocumentAuthorizer |
getDocumentAuthorizer() |
protected boolean |
isDocumentInitiator(Document document,
Person user) |
void |
setDocumentAuthorizer(DocumentAuthorizer documentAuthorizer) |
void |
setDocumentAuthorizerClass(Class<? extends DocumentAuthorizer> documentAuthorizerClass) |
canEditField, canEditGroup, canEditLine, canEditLineField, canEditWidget, canPartialUnmaskField, canPerformAction, canPerformLineAction, canUnmaskField, canViewField, canViewGroup, canViewLine, canViewLineField, canViewWidget, getConfigurationService, getDataObjectContext, getEditModes, getFieldPermissionDetails, getGroupPermissionDetails, getWidgetPermissionDetails, isAuthorizedByTemplate, setConfigurationServicegetPermissionDetailValues, getPermissionService, getPersonService, getRoleQualification, isAuthorized, isAuthorized, isAuthorizedByTemplate, isAuthorizedByTemplate, permissionExistsByTemplate, permissionExistsByTemplate, permissionExistsByTemplateclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisAuthorized, isAuthorized, isAuthorizedByTemplate, isAuthorizedByTemplateprotected static org.apache.commons.logging.Log LOG
public static final String PRE_ROUTING_ROUTE_NAME
public DocumentViewAuthorizerBase()
public Set<String> getActionFlags(View view, ViewModel model, Person user, Set<String> actions)
ViewAuthorizer
Action flags are created for views to indicate some action or feature should be enabled. These flags can be
used within expressions for configuring the view content.
For example:
For each action flag, KIM is consulted to determine if a permission exist for the template associated with the action flag. If so, a check is then made to determine if the user has that permission. If the permission fails for the user, the action flag is removed from the returned set.
The Set of available action flags should first be exported by the
ViewPresentationController.getActionFlags(View, org.kuali.rice.krad.web.form.UifFormBase) method. The
set returned from this method will be passed as the method argument here by the framework.
getActionFlags in interface ViewAuthorizergetActionFlags in class ViewAuthorizerBaseview - - view instance the action flags apply tomodel - - object containing the view datauser - - user we are authorizing the actions foractions - - set of action flags to authorizeorg.kuali.rice.krad.uif.view.ViewAuthorizer#getActionFlags(org.kuali.rice.krad.uif.view.View,
org.kuali.rice.krad.uif.view.ViewModel, org.kuali.rice.kim.api.identity.Person,
java.util.Set) public final boolean canInitiate(String documentTypeName, Person user)
canInitiate in interface DocumentAuthorizerpublic final boolean canOpen(Document document, Person user)
canOpen in interface DocumentAuthorizerpublic boolean canOpenView(View view, ViewModel model, Person user)
ViewAuthorizerBasecanOpenView in interface ViewAuthorizercanOpenView in class ViewAuthorizerBaseview - - view instance to check authorization formodel - - object containing the view datauser - - user to authorizeViewAuthorizer.canOpenView(View, ViewModel, org.kuali.rice.kim.api.identity.Person)public boolean canEdit(Document document, Person user)
canEdit in interface DocumentAuthorizerpublic boolean canEditView(View view, ViewModel model, Person user)
ViewAuthorizerBasecanEditView in interface ViewAuthorizercanEditView in class ViewAuthorizerBaseview - - view instance to check authorization formodel - - object containing the view datauser - - user to authorizeViewAuthorizer.canEditView(org.kuali.rice.krad.uif.view.View, org.kuali.rice.krad.uif.view.ViewModel,
org.kuali.rice.kim.api.identity.Person)public boolean canAnnotate(Document document, Person user)
canAnnotate in interface DocumentAuthorizerpublic boolean canReload(Document document, Person user)
canReload in interface DocumentAuthorizerpublic boolean canClose(Document document, Person user)
canClose in interface DocumentAuthorizerpublic boolean canSave(Document document, Person user)
canSave in interface DocumentAuthorizerpublic boolean canRoute(Document document, Person user)
canRoute in interface DocumentAuthorizerpublic boolean canCancel(Document document, Person user)
canCancel in interface DocumentAuthorizerpublic boolean canRecall(Document document, Person user)
canRecall in interface DocumentAuthorizerpublic boolean canCopy(Document document, Person user)
canCopy in interface DocumentAuthorizerpublic boolean canPerformRouteReport(Document document, Person user)
canPerformRouteReport in interface DocumentAuthorizerpublic boolean canBlanketApprove(Document document, Person user)
canBlanketApprove in interface DocumentAuthorizerpublic boolean canApprove(Document document, Person user)
canApprove in interface DocumentAuthorizerpublic boolean canDisapprove(Document document, Person user)
canDisapprove in interface DocumentAuthorizerpublic boolean canSendNoteFyi(Document document, Person user)
canSendNoteFyi in interface DocumentAuthorizerpublic boolean canFyi(Document document, Person user)
canFyi in interface DocumentAuthorizerpublic boolean canAcknowledge(Document document, Person user)
canAcknowledge in interface DocumentAuthorizerpublic final boolean canReceiveAdHoc(Document document, Person user, String actionRequestCode)
canReceiveAdHoc in interface DocumentAuthorizerpublic final boolean canAddNoteAttachment(Document document, String attachmentTypeCode, Person user)
canAddNoteAttachment in interface DocumentAuthorizerpublic final boolean canDeleteNoteAttachment(Document document, String attachmentTypeCode, String authorUniversalIdentifier, Person user)
canDeleteNoteAttachment in interface DocumentAuthorizerpublic final boolean canViewNoteAttachment(Document document, String attachmentTypeCode, String authorUniversalIdentifier, Person user)
canViewNoteAttachment in interface DocumentAuthorizerpublic final boolean canSendAdHocRequests(Document document, String actionRequestCd, Person user)
canSendAdHocRequests in interface DocumentAuthorizerpublic boolean canEditDocumentOverview(Document document, Person user)
canEditDocumentOverview in interface DocumentAuthorizerpublic boolean canSendAnyTypeAdHocRequests(Document document, Person user)
canSendAnyTypeAdHocRequests in interface DocumentAuthorizerpublic boolean canTakeRequestedAction(Document document, String actionRequestCode, Person user)
canTakeRequestedAction in interface DocumentAuthorizerprotected void addPermissionDetails(Object dataObject, Map<String,String> attributes)
DataObjectAuthorizerBaseaddPermissionDetails in class DataObjectAuthorizerBasedataObject - - the primary data object (i.e. the main object instance
behind the lookup result row or inquiry) or the documentattributes - - permission details will be added to this mapprotected void addRoleQualification(Object dataObject, Map<String,String> attributes)
DataObjectAuthorizerBaseaddRoleQualification in class DataObjectAuthorizerBasedataObject - - the primary data object (i.e. the main object instance
behind the lookup result row or inquiry) or the documentattributes - - role qualifiers will be added to this mapprotected void addStandardAttributes(Document document, Map<String,String> attributes)
protected boolean isDocumentInitiator(Document document, Person user)
public DocumentAuthorizer getDocumentAuthorizer()
public void setDocumentAuthorizer(DocumentAuthorizer documentAuthorizer)
public void setDocumentAuthorizerClass(Class<? extends DocumentAuthorizer> documentAuthorizerClass)
Copyright © 2005–2016 The Kuali Foundation. All rights reserved.