本文整理汇总了Java中org.kuali.rice.krad.uif.component.ComponentSecurity.isEditAuthz方法的典型用法代码示例。如果您正苦于以下问题:Java ComponentSecurity.isEditAuthz方法的具体用法?Java ComponentSecurity.isEditAuthz怎么用?Java ComponentSecurity.isEditAuthz使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.kuali.rice.krad.uif.component.ComponentSecurity
的用法示例。
在下文中一共展示了ComponentSecurity.isEditAuthz方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: canEditField
import org.kuali.rice.krad.uif.component.ComponentSecurity; //导入方法依赖的package包/类
/**
* @see ViewAuthorizer#canEditField(org.kuali.rice.krad.uif.view.View, org.kuali.rice.krad.uif.view.ViewModel,
* org.kuali.rice.krad.uif.field.Field, java.lang.String, org.kuali.rice.kim.api.identity.Person)
*/
public boolean canEditField(View view, ViewModel model, Field field, String propertyName, Person user) {
ComponentSecurity componentSecurity = field.getComponentSecurity();
// check component security exists
if (componentSecurity == null) {
return true;
}
// first check hide flag is set (lower precedence)
if (componentSecurity.isEditAuthz() == null && !isDataFieldAttributeSecurityHide(field)) {
return true;
}
// then check edit authz is set (higher precedence)
if (componentSecurity.isEditAuthz() != null && !componentSecurity.isEditAuthz().booleanValue()) {
return true;
}
return isAuthorizedByTemplate(view, field, model, KimConstants.PermissionTemplateNames.EDIT_FIELD, user, null,
null, false);
}
示例2: canEditGroup
import org.kuali.rice.krad.uif.component.ComponentSecurity; //导入方法依赖的package包/类
/**
* @see ViewAuthorizer#canEditGroup(org.kuali.rice.krad.uif.view.View, org.kuali.rice.krad.uif.view.ViewModel,
* org.kuali.rice.krad.uif.container.Group, java.lang.String, org.kuali.rice.kim.api.identity.Person)
*/
public boolean canEditGroup(View view, ViewModel model, Group group, String groupId, Person user) {
ComponentSecurity componentSecurity = group.getComponentSecurity();
// check component security exists
if (componentSecurity == null) {
return true;
}
// check edit group authz flag is set
if (componentSecurity.isEditAuthz() == null || !componentSecurity.isEditAuthz().booleanValue()) {
return true;
}
return isAuthorizedByTemplate(view, group, model, KimConstants.PermissionTemplateNames.EDIT_GROUP, user, null,
null, false);
}
示例3: canEditWidget
import org.kuali.rice.krad.uif.component.ComponentSecurity; //导入方法依赖的package包/类
/**
* @see ViewAuthorizer#canEditWidget(org.kuali.rice.krad.uif.view.View, org.kuali.rice.krad.uif.view.ViewModel,
* org.kuali.rice.krad.uif.widget.Widget, java.lang.String, org.kuali.rice.kim.api.identity.Person)
*/
public boolean canEditWidget(View view, ViewModel model, Widget widget, String widgetId, Person user) {
ComponentSecurity componentSecurity = widget.getComponentSecurity();
// check component security exists
if (componentSecurity == null) {
return true;
}
// check edit widget authz flag is set
if (componentSecurity.isEditAuthz() == null || !componentSecurity.isEditAuthz().booleanValue()) {
return true;
}
return isAuthorizedByTemplate(view, widget, model, KimConstants.PermissionTemplateNames.EDIT_WIDGET, user, null,
null, false);
}