Allow import to writable calendar subscriptions

pull/259/head
Francis Lachapelle 2019-10-02 09:15:25 -04:00
parent ea18473746
commit 2b27745a00
3 changed files with 4 additions and 4 deletions

1
NEWS
View File

@ -23,6 +23,7 @@ Bug fixes
- [web] restore cards selection after automatic refresh (#4809)
- [web] don't mark draft as deleted when SOGoMailKeepDraftsAfterSend is enabled (#4830)
- [web] allow single-day vacation auto-reply (#4698)
- [web] allow import to calendar subscriptions with creation rights
- [core] honor IMAPLoginFieldName also when setting IMAP ACLs
- [core] honor groups when setting IMAP ACLs
- [core] honor "any authenticated user" when setting IMAP ACLs

View File

@ -197,15 +197,14 @@ _intValueFromHex (NSString *hexString)
allACLs = ([owner isEqualToString: userLogin] ? nil : [folder aclsForUser: userLogin]);
objectCreator = ([owner isEqualToString: userLogin] || [allACLs containsObject: SOGoRole_ObjectCreator]);
objectEraser = ([owner isEqualToString: userLogin] || [allACLs containsObject: SOGoRole_ObjectEraser]);
acls = [NSDictionary dictionaryWithObjectsAndKeys: [NSNumber numberWithBool: objectCreator], @"objectCreator",
[NSNumber numberWithBool: objectEraser], @"objectEraser", nil];
if ([folder isKindOfClass: [SOGoWebAppointmentFolder class]])
objectCreator = objectEraser = synchronize = NO;
else
synchronize = [folder synchronize];
acls = [NSDictionary dictionaryWithObjectsAndKeys: [NSNumber numberWithBool: objectCreator], @"objectCreator",
[NSNumber numberWithBool: objectEraser], @"objectEraser", nil];
[calendar setObject: acls forKey: @"acls"];
if ([[folder nameInContainer] isEqualToString: @"personal"])

View File

@ -547,7 +547,7 @@
ng-hide="::($menuCtrl.calendar.isSubscription || $menuCtrl.calendar.isWebCalendar)">
<!-- divider -->
</md-menu-divider>
<md-menu-item ng-hide="::($menuCtrl.calendar.isSubscription || $menuCtrl.calendar.isWebCalendar)">
<md-menu-item ng-show="::$menuCtrl.calendar.acls.objectCreator">
<md-button ng-click="$menuCtrl.importCalendar($event)">
<var:string label:value="Import"/>
</md-button>