Bug 232728

Summary: items in read-only resource are editable
Product: [Frameworks and Libraries] Akonadi Reporter: Will Stephenson <wstephenson>
Component: SingleFileResourceBaseAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: dvratil, kdepim-bugs, tokoe
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Unspecified   
Latest Commit: Version Fixed In:

Description Will Stephenson 2010-03-30 18:31:19 UTC
Version:            (using Devel)
Installed from:    Compiled sources

If a resource is read-only:

Expected behaviour:
* Edit Contact... action is disabled
* Double click on contact does not trigger action

Observed behaviour:
* Edit Contact... and double click both trigger the contact editor dialog
* The dialog is empty
Comment 1 Tobias Koenig 2010-03-31 12:46:48 UTC
Hej Will,

which specific resource are you talking about?

KAddressBook checks the access rights of the collection the contacts
are stored in, so the resource is responsible to remove all rights from
all resources if the resource is marked as read-only.
The 'Personal Contacts' resource does this for example... when marking
as read-only, it reloads all collections and removes the modify rights
from them.

Ciao,
Tobias
Comment 2 Will Stephenson 2010-03-31 13:07:28 UTC
It's a vcard file resource
Comment 3 Tobias Koenig 2010-03-31 13:23:47 UTC
I reassign this to the resource developer. The SingleFileResourceBase does not call synchronize() when read-only flag has changed, therefor it does not update the access rights of the resource collection correctly.
Comment 4 Will Stephenson 2010-03-31 14:50:12 UTC
I hadn't changed the read-only flag on the resource in recent memory.  Does that affect your analysis?
Comment 5 Daniel Vrátil 2013-06-20 09:55:02 UTC
Works in KDE 4.11. Collection rights are correctly updated when Read Only settings is changed.