Bug 236619 - Possible to create an event in a read only calendar
Summary: Possible to create an event in a read only calendar
Status: VERIFIED FIXED
Alias: None
Product: korganizer
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: HI normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-06 22:37 UTC by Sabine Faure
Modified: 2010-07-28 22:32 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sabine Faure 2010-05-06 22:37:26 UTC
Version:            (using Devel)
Compiler:          gcc 4.3.2 
OS:                Linux
Installed from:    Compiled sources

- Launch KOrg
- Go to Settings menu/Configure KOrganizer...
- Click on the 'General' icon and go to the Calendar Account tab
- Select a calendar (ex iCal file 1) and click on 'Modify...'
- Check the 'Read only' check box in the 'Access Rights' section of the 'Select Calendar - Akonadi Resource' dialogue
- Click on 'Ok' twice
- Create a new event in agenda view for today using iCal file 1.

The event is created and displayed in agenda view whereas I am guessing that there should be an error message saying something like this: 
''This calendar is set as 'read only'.
To be able to store items in it go to Settings menu/Configure KOrganizer - General icon - Calendar Account tab, select the calendar, click on Modify button and uncheck the 'Read only' check box''

Trunk, Svn Rev 1123669
Trunk, Svn Rev 1123669
Comment 1 Sergio Martins 2010-06-08 15:38:48 UTC
SVN commit 1135956 by smartins:

Don't create delete/create/modify jobs if we lack access rights and the app forgot to block it at app level.

CCBUG: 236619



 M  +17 -4     incidencechanger.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1135956
Comment 2 Sergio Martins 2010-06-08 18:30:52 UTC
SVN commit 1136005 by smartins:

Use Akonadi::hasChangeRights() and Akonadi::hasDeleteRights() instead of incidence->isReadOnly() because we have more granularity now.

CCBUG: 236619


 M  +1 -1      actionmanager.cpp  
 M  +3 -6      calendarview.cpp  
 M  +3 -3      koeventpopupmenu.cpp  
 M  +1 -1      koeventview.cpp  
 M  +1 -1      korgac/alarmdialog.cpp  
 M  +2 -3      views/agendaview/koagenda.cpp  
 M  +4 -1      views/agendaview/koagendaitem.cpp  
 M  +4 -9      views/journalview/journalview.cpp  
 M  +0 -3      views/journalview/journalview.h  
 M  +4 -5      views/monthview/monthitem.cpp  
 M  +1 -1      views/timelineview/timelineitem.cpp  
 M  +2 -2      views/todoview/kotodomodel.cpp  
 M  +4 -5      views/todoview/kotodoview.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1136005
Comment 3 Sabine Faure 2010-07-05 00:34:52 UTC
I retested this today and it is still possible to create an event in a read only calendar for some reason.

Trunk, Svn Rev 1145265
Comment 4 Sergio Martins 2010-07-24 01:30:38 UTC
SVN commit 1153761 by smartins:

When looking if a collection has rights to delete or change an item, don't use
item.parentCollection() because that can be old.

Instead, ask the Calendar, which will use the most recent collection it got from
the model.

BUG: 236619



 M  +19 -1     akonadi/kcal/calendar.cpp  
 M  +14 -1     akonadi/kcal/calendar.h  
 M  +3 -3      akonadi/kcal/incidencechanger.cpp  
 M  +1 -11     akonadi/kcal/utils.cpp  
 M  +1 -1      kontact/plugins/korganizer/apptsummarywidget.cpp  
 M  +2 -2      kontact/plugins/korganizer/todosummarywidget.cpp  
 M  +1 -1      korganizer/actionmanager.cpp  
 M  +3 -3      korganizer/calendarview.cpp  
 M  +8 -7      korganizer/koeventpopupmenu.cpp  
 M  +1 -1      korganizer/koeventview.cpp  
 M  +4 -2      korganizer/korgac/alarmdialog.cpp  
 M  +2 -2      korganizer/views/agendaview/koagenda.cpp  
 M  +2 -1      korganizer/views/agendaview/koagendaitem.cpp  
 M  +2 -2      korganizer/views/journalview/journalview.cpp  
 M  +3 -3      korganizer/views/monthview/monthitem.cpp  
 M  +2 -1      korganizer/views/timelineview/timelineitem.cpp  
 M  +2 -2      korganizer/views/todoview/kotodomodel.cpp  
 M  +5 -4      korganizer/views/todoview/kotodoview.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1153761
Comment 5 Sergio Martins 2010-07-24 01:31:20 UTC
I can't find more bugs about readonlu stuff. Looks ok.
Comment 6 Sabine Faure 2010-07-28 22:32:08 UTC
It is corrected now.

The read only calendar is now unavailable to choose from the calendar list in the 'New Event' dialogue so it is impossible to create an event in it.


Trunk, Svn Rev 1156007