CCM NG: Copy permissions from parent folder to new sub folder
git-svn-id: https://svn.libreccm.org/ccm/ccm_ng@5320 8810af33-2d31-482b-a856-94f89814c4dfpull/2/head
parent
d7f9f304e5
commit
7a806f8ec6
|
|
@ -23,6 +23,7 @@ import com.arsdigita.kernel.KernelConfig;
|
|||
import org.libreccm.categorization.Category;
|
||||
import org.libreccm.categorization.CategoryManager;
|
||||
import org.libreccm.configuration.ConfigurationManager;
|
||||
import org.libreccm.security.PermissionManager;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
|
|
@ -46,25 +47,28 @@ import javax.transaction.Transactional;
|
|||
public class FolderManager {
|
||||
|
||||
@Inject
|
||||
private EntityManager entityManager;
|
||||
|
||||
@Inject
|
||||
private ConfigurationManager confManager;
|
||||
|
||||
@Inject
|
||||
private FolderRepository folderRepo;
|
||||
private AssetManager assetManager;
|
||||
|
||||
@Inject
|
||||
private CategoryManager categoryManager;
|
||||
|
||||
@Inject
|
||||
private ContentItemRepository itemRepo;
|
||||
private ConfigurationManager confManager;
|
||||
|
||||
@Inject
|
||||
private EntityManager entityManager;
|
||||
|
||||
@Inject
|
||||
private FolderRepository folderRepo;
|
||||
|
||||
@Inject
|
||||
private ContentItemManager itemManager;
|
||||
|
||||
@Inject
|
||||
private AssetManager assetManager;
|
||||
private ContentItemRepository itemRepo;
|
||||
|
||||
@Inject
|
||||
private PermissionManager permissionManager;
|
||||
|
||||
/**
|
||||
* An enum describing if a folder can be deleted or not and why.
|
||||
|
|
@ -188,6 +192,7 @@ public class FolderManager {
|
|||
folderRepo.save(folder);
|
||||
|
||||
categoryManager.addSubCategoryToCategory(folder, parent);
|
||||
permissionManager.copyPermissions(parent, folder, true);
|
||||
|
||||
return folder;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue