cancel
Showing results for 
Search instead for 
Did you mean: 

Prohibit file deletion.

statira
Confirmed Champ
Confirmed Champ
Hello again,
I want to prohibit all users except alfresco admins to delete files, even ones they created themselves. I've tried this:

Add somewhere near the top of the model/permissionDefinitions.xml file new permissionGroup definition and assign permissions by your needs:

<permissionGroup name=”FullWithoutDelete” allowFullControl=”false” expose=”false”>
<includePermissionGroup type=”sys:base” permissionGroup=”Read”/>
<includePermissionGroup type=”sys:base” permissionGroup=”Write”/>
<includePermissionGroup type=”sys:base” permissionGroup=”AddChildren”/>
<includePermissionGroup type=”sys:base” permissionGroup=”Execute”/>
</permissionGroup>

then find:

<globalPermission permission=”FullControl” authority=”ROLE_OWNER”/>

and change it to:

<globalPermission permission=”FullWithoutDelete” authority=”ROLE_OWNER”/>

but it gave me absolutelu no result. It seems that changes just not applying. What am I missing?
3 REPLIES 3

mrogers
Star Contributor
Star Contributor
Please post your config so we can see what you have actually done.

You may be missing something like ownership rights.   Please post your config so we can see what you have actually done.

There is also an undeletable aspect that may be part of your solution.

Thanks for your reply. Here are mine configs attached.

statira
Confirmed Champ
Confirmed Champ
Well, I found another solution, which gave me another problem. I created a rule to execute a simple javascript (document.owner = "admin"Smiley Wink to change the file owner, and it works, but has a strange side-effect, working with CMIS or webdav Collaborators loose rights to edit files in folders this rule is applied to (but still able to edit files in web-interface), and Contributors can't edit their own documents too, they can only upload files, thus only Managers are able to edit docs.
Any ideas how to fix it?