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


Java RepositoryAction类代码示例

本文整理汇总了Java中org.guvnor.structure.security.RepositoryAction的典型用法代码示例。如果您正苦于以下问题:Java RepositoryAction类的具体用法?Java RepositoryAction怎么用?Java RepositoryAction使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: migrateRepositories

import org.guvnor.structure.security.RepositoryAction; //导入依赖的package包/类
public void migrateRepositories(AuthorizationPolicy policy) {
    Collection<Repository> itemList = repositoryService.getAllRepositories();
    for (Repository item : itemList) {
        Permission p = permissionManager.createPermission(item,
                                                          RepositoryAction.READ,
                                                          true);
        for (String groupName : item.getGroups()) {
            Group group = getGroup(groupName);
            PermissionCollection pc = policy.getPermissions(group);
            pc.add(p);
        }
        migrateProjects(policy,
                        item);
    }
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:16,代码来源:ACLMigrationTool.java

示例2: getMenus

import org.guvnor.structure.security.RepositoryAction; //导入依赖的package包/类
@WorkbenchMenu
public Menus getMenus() {
    return MenuFactory
            .newTopLevelMenu( constants.MenuOrganizationalUnits() )
            .withPermission( OrganizationalUnit.RESOURCE_TYPE, OrganizationalUnitAction.READ )
            .menus()
            .menu( constants.MenuManageOrganizationalUnits() )
            .respondsWith( () -> placeManager.goTo( "org.kie.workbench.common.screens.organizationalunit.manager.OrganizationalUnitManager" ) )
            .endMenu()
            .endMenus()
            .endMenu()
            .newTopLevelMenu( constants.repositories() )
            .menus()
            .menu( constants.listRepositories() )
            .withPermission( Repository.RESOURCE_TYPE, RepositoryAction.READ )
            .respondsWith( () -> placeManager.goTo( "RepositoriesEditor" ) )
            .endMenu()
            .menu( constants.cloneRepository() )
            .withPermission( Repository.RESOURCE_TYPE, RepositoryAction.CREATE )
            .respondsWith( cloneRepoCommand )
            .endMenu()
            .menu( constants.newRepository() )
            .withPermission( Repository.RESOURCE_TYPE, RepositoryAction.CREATE )
            .respondsWith( newRepoCommand )
            .endMenu()
            .endMenus()
            .endMenu().build();
}
 
开发者ID:kiegroup,项目名称:kie-wb-distributions,代码行数:29,代码来源:AdministrationPerspective.java

示例3: canReadRepository

import org.guvnor.structure.security.RepositoryAction; //导入依赖的package包/类
public boolean canReadRepository(Repository repository) {
    return authorizationManager.authorize(repository,
                                          RepositoryAction.READ,
                                          user);
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:6,代码来源:OrganizationalUnitController.java

示例4: canCreateRepositories

import org.guvnor.structure.security.RepositoryAction; //导入依赖的package包/类
public boolean canCreateRepositories() {
    return authorizationManager.authorize(Repository.RESOURCE_TYPE,
                                          RepositoryAction.CREATE,
                                          user);
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:6,代码来源:RepositoryController.java

示例5: canReadRepositories

import org.guvnor.structure.security.RepositoryAction; //导入依赖的package包/类
public boolean canReadRepositories() {
    return authorizationManager.authorize(Repository.RESOURCE_TYPE,
                                          RepositoryAction.READ,
                                          user);
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:6,代码来源:RepositoryController.java

示例6: canUpdateRepository

import org.guvnor.structure.security.RepositoryAction; //导入依赖的package包/类
public boolean canUpdateRepository(String repoId) {
    return authorizationManager.authorize(new ResourceRef(repoId,
                                                          Repository.RESOURCE_TYPE),
                                          RepositoryAction.UPDATE,
                                          user);
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:7,代码来源:RepositoryController.java

示例7: canDeleteRepository

import org.guvnor.structure.security.RepositoryAction; //导入依赖的package包/类
public boolean canDeleteRepository(Repository repository) {
    return authorizationManager.authorize(repository,
                                          RepositoryAction.DELETE,
                                          user);
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:6,代码来源:RepositoryController.java


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