From 99dd110c304090706737325cb92daf12bf02b63e Mon Sep 17 00:00:00 2001 From: David Faure Date: Thu, 22 Jul 2004 11:09:00 +0000 Subject: [PATCH] Don't try to set annotations on folders where we don't have Administer permissions svn path=/branches/proko2/kdepim/; revision=331716 --- kmfoldercachedimap.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/kmfoldercachedimap.cpp b/kmfoldercachedimap.cpp index a850bcc87..127a9f97c 100644 --- a/kmfoldercachedimap.cpp +++ b/kmfoldercachedimap.cpp @@ -797,7 +797,8 @@ void KMFolderCachedImap::serverSyncInternal() case SYNC_STATE_SET_ANNOTATIONS: mSyncState = SYNC_STATE_SET_ACLS; - if( mAccount->hasAnnotationSupport() ) { + if ( mAccount->hasAnnotationSupport() && + ( mUserRights <= 0 || ( mUserRights & ACLJobs::Administer ) ) ) { newState( mProgress, i18n("Setting annotations")); // If in the future we want to set more annotations, we should then write // a multiSetAnnotation job in annotationjobs.* @@ -1768,9 +1769,9 @@ KMFolderCachedImap::slotSetAnnotationResult(KIO::Job *job) if ( (*it).parent != folder() ) return; // Shouldn't happen bool cont = true; - if ( job->error() ) + if ( job->error() ) { cont = mAccount->handleJobError( job, i18n( "Error while setting annotation: " ) + '\n' ); - else { + } else { mContentsTypeChanged = false; if (mAccount->slave()) mAccount->removeJob(job); }