cancel
Showing results for 
Search instead for 
Did you mean: 

Permission to edit and delete only users own file using form builder

Former Member
0 Kudos

Hi,

I need to allow users to create documents in a KM folder, but they must be able to edit and delete their own file.

Permission to edit and delete only users own file. Other users in different department can able to view file, it should not allow to edit or delete. 'How to Implement a Single Folder - Multiple Authors Scenario'. For this, Developed my application in form builder .

Purpose of form builder requirementwise browsing file folder location pointing to portal km location. But it cannot be possible in webdynpro / pdk application.

In webdynpro, file permission can able possible below code

IUMPrincipal Everyone = WPUMFactory.getGroupFactory().getGroup("Everyone");

IUMPrincipal Creator = WPUMFactory.getUserFactory().getUser(resource.getCreatedBy());

ISecurityManager sm = resource.getRepositoryManager().getSecurityManager(resource);

if(sm != null && sm instanceof IAclSecurityManager){

IAclSecurityManager asm = (IAclSecurityManager)sm;

IResourceAclManager ram = asm.getAclManager();

ram.removeAcl(resource);

IResourceAcl ra = ram.createAcl(resource);

IResourceAclEntryList rel = ra.getEntries();

IResourceAclEntryListIterator it = rel.iterator();

while(it.hasNext()){

ra.removeEntry(it.next());

}

ra.addEntry(ram.createAclEntry(Everyone, false, ram.getPermission(IAclPermission.ACL_PERMISSION_READ), 0));

ra.addEntry(ram.createAclEntry(Creator , false, ram.getPermission(IAclPermission.ACL_PERMISSION_FULL_CONTROL), 2));

}

Please adivse how to achieve above functionality in form builder.

By

kumar. G

Accepted Solutions (0)

Answers (1)

Answers (1)

holger_stumm2
Active Contributor
0 Kudos

Hi Kumar,

AFAIK, this is not possible with formbuilder.

You can only set file access rights on a folder level.

A workaround would be that every user has their own folder, where you can have create, delete access.

But I am not aware of a customization which would work in one directory.

cheers

hs