Mailing List Archive

Broken iCal Delegation listing / Database?
Earlier today in my companies davical install the Relationship entry id3
(Can read from). was deleted due to user error. This naturally had the
effect of removing the read only permission from all calendars where it was
used.

Since we have a large number of users and permissions we didn't want to try
to restore them all by hand.
The last database backup we had was a day old so rather than remove all
calendar entries added in the last day by restoring the entire backup we
tried restoring just the relationship_type and relationship tables back to
their state when the backup was made.

On the surface that seemed to work, all the readonly permissions mappings
returned in the web interface and testing from sunbird/lightning we could
access calendars again. However we noticed later on that if in iCal we
went to the Delegations tab under account settings that groups were being
listed rather than the users that the group should give access to. (for
example we have a group called global-read-access which most calendar users
have a readonly relationship to so that they all can read each other's
calendars. Previously we would see all those users listed in the
delegation tab list but now we just see global-read-access listed.)

I can only assume at this point our database restore has not quite worked as
well as we hoped. Can anybody point us in the direction of what we have
broken?

Thanks
-J
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.morphoss.com/pipermail/davical-users/attachments/20091127/fee22cbf/attachment.htm>
-------------- next part --------------
Broken iCal Delegation listing / Database? [ In reply to ]
On 27/11/09 18:46, Jason alavaliant wrote:
> Earlier today in my companies davical install the Relationship entry
> id3 (Can read from). was deleted due to user error. This
> naturally had the effect of removing the read only permission from all
> calendars where it was used.
>
> Since we have a large number of users and permissions we didn't want
> to try to restore them all by hand.
> The last database backup we had was a day old so rather than remove
> all calendar entries added in the last day by restoring the entire
> backup we tried restoring just the relationship_type and relationship
> tables back to their state when the backup was made.
>
> On the surface that seemed to work, all the readonly permissions
> mappings returned in the web interface and testing from
> sunbird/lightning we could access calendars again. However we
> noticed later on that if in iCal we went to the Delegations tab under
> account settings that groups were being listed rather than the users
> that the group should give access to. (for example we have a group
> called global-read-access which most calendar users have a readonly
> relationship to so that they all can read each other's calendars.
> Previously we would see all those users listed in the delegation tab
> list but now we just see global-read-access listed.)
>
> I can only assume at this point our database restore has not quite
> worked as well as we hoped. Can anybody point us in the direction
> of what we have broken?
>

You'll need to restore the relationship table as well as the
relationship_type table because there is a ON DELETE CASCADE integrity
check from the relationship_type table that means that all relationships
which used that type will have been deleted as well.

I shouldn't imagine that there will be a high rate of change to that
table either, so the day old backup should be OK. Obviously you'll only
need to restore the rows that refer to the relationship_type that was
deleted.

Cheers,
Andrew.

--
------------------------------------------------------------------------
http://andrew.mcmillan.net.nz/ Porirua, New Zealand
Twitter: _karora Phone: +64(272)DEBIAN
Communicate! It can't make things any worse.
------------------------------------------------------------------------

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.morphoss.com/pipermail/davical-users/attachments/20091127/f055a549/attachment.htm>
-------------- next part --------------
Broken iCal Delegation listing / Database? [ In reply to ]
On Fri, Nov 27, 2009 at 7:38 PM, Andrew McMillan <andrew at mcmillan.net.nz>wrote:

> On 27/11/09 18:46, Jason alavaliant wrote:
>
> Earlier today in my companies davical install the Relationship entry id3
> (Can read from). was deleted due to user error. This naturally had the
> effect of removing the read only permission from all calendars where it was
> used.
>
> Since we have a large number of users and permissions we didn't want to try
> to restore them all by hand.
> The last database backup we had was a day old so rather than remove all
> calendar entries added in the last day by restoring the entire backup we
> tried restoring just the relationship_type and relationship tables back to
> their state when the backup was made.
>
> On the surface that seemed to work, all the readonly permissions mappings
> returned in the web interface and testing from sunbird/lightning we could
> access calendars again. However we noticed later on that if in iCal we
> went to the Delegations tab under account settings that groups were being
> listed rather than the users that the group should give access to. (for
> example we have a group called global-read-access which most calendar users
> have a readonly relationship to so that they all can read each other's
> calendars. Previously we would see all those users listed in the
> delegation tab list but now we just see global-read-access listed.)
>
> I can only assume at this point our database restore has not quite worked
> as well as we hoped. Can anybody point us in the direction of what we
> have broken?
>
>
> You'll need to restore the relationship table as well as the
> relationship_type table because there is a ON DELETE CASCADE integrity check
> from the relationship_type table that means that all relationships which
> used that type will have been deleted as well.
>
> I shouldn't imagine that there will be a high rate of change to that table
> either, so the day old backup should be OK. Obviously you'll only need to
> restore the rows that refer to the relationship_type that was deleted.
>
> Cheers,
> Andrew.
>


Thanks for the response, however we already did restore the relationship
table when we restored the relationship_type table. (Perhaps my
original wording was a bit bad. I probally should have written 'we tried
restoring both the relationship_type and relationship tables' rather than
'we tried restoring just the relationship_type and relationship tables').

From what I can see in the web interfaces the permissions are there, for
some reason iCal just doesn't seem to be detecting them right when we try to
list calendars in it's Delegation tab.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.morphoss.com/pipermail/davical-users/attachments/20091127/f0f0175b/attachment.htm>
-------------- next part --------------