當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。