当前位置: 首页>>代码示例>>Java>>正文


Java ComponentSecurity.isViewAuthz方法代码示例

本文整理汇总了Java中org.kuali.rice.krad.uif.component.ComponentSecurity.isViewAuthz方法的典型用法代码示例。如果您正苦于以下问题:Java ComponentSecurity.isViewAuthz方法的具体用法?Java ComponentSecurity.isViewAuthz怎么用?Java ComponentSecurity.isViewAuthz使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.kuali.rice.krad.uif.component.ComponentSecurity的用法示例。


在下文中一共展示了ComponentSecurity.isViewAuthz方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: canViewField

import org.kuali.rice.krad.uif.component.ComponentSecurity; //导入方法依赖的package包/类
/**
 * @see ViewAuthorizer#canViewField(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 canViewField(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.isViewAuthz() == null && !isDataFieldAttributeSecurityHide(field)) {
        return true;
    }

    // then check view authz is set (higher precedence)
    if (componentSecurity.isViewAuthz() != null && !componentSecurity.isViewAuthz().booleanValue()) {
        return true;
    }

    return isAuthorizedByTemplate(view, field, model, KimConstants.PermissionTemplateNames.VIEW_FIELD, user, null,
            null, false);
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:26,代码来源:ViewAuthorizerBase.java

示例2: canViewGroup

import org.kuali.rice.krad.uif.component.ComponentSecurity; //导入方法依赖的package包/类
/**
 * @see ViewAuthorizer#canViewGroup(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 canViewGroup(View view, ViewModel model, Group group, String groupId, Person user) {
    ComponentSecurity componentSecurity = group.getComponentSecurity();

    // check component security exists
    if (componentSecurity == null) {
        return true;
    }

    // check view group authz flag is set
    if (componentSecurity.isViewAuthz() == null || !componentSecurity.isViewAuthz().booleanValue()) {
        return true;
    }

    return isAuthorizedByTemplate(view, group, model, KimConstants.PermissionTemplateNames.VIEW_GROUP, user, null,
            null, false);
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:21,代码来源:ViewAuthorizerBase.java

示例3: canViewWidget

import org.kuali.rice.krad.uif.component.ComponentSecurity; //导入方法依赖的package包/类
/**
 * @see ViewAuthorizer#canViewWidget(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 canViewWidget(View view, ViewModel model, Widget widget, String widgetId, Person user) {
    ComponentSecurity componentSecurity = widget.getComponentSecurity();

    // check component security exists
    if (componentSecurity == null) {
        return true;
    }

    // check view widget authz flag is set
    if (componentSecurity.isViewAuthz() == null || !componentSecurity.isViewAuthz().booleanValue()) {
        return true;
    }

    return isAuthorizedByTemplate(view, widget, model, KimConstants.PermissionTemplateNames.VIEW_WIDGET, user, null,
            null, false);
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:21,代码来源:ViewAuthorizerBase.java


注:本文中的org.kuali.rice.krad.uif.component.ComponentSecurity.isViewAuthz方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。