mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-20 19:05:25 +00:00
fix(calendar(js)): conditional display of edit and delete buttons
This commit is contained in:
@@ -837,10 +837,21 @@ static NSArray *reminderValues = nil;
|
||||
return rc;
|
||||
}
|
||||
|
||||
- (BOOL) isReadOnly
|
||||
- (BOOL) isEditable
|
||||
{
|
||||
return [self getEventRWType] != componentReadableWritable;
|
||||
return [self getEventRWType] == componentReadableWritable;
|
||||
}
|
||||
|
||||
- (BOOL) isErasable
|
||||
{
|
||||
NSString *owner, *userLogin;
|
||||
|
||||
userLogin = [[context activeUser] login];
|
||||
owner = [componentCalendar ownerInContext: context];
|
||||
|
||||
return ([owner isEqualToString: userLogin] || [[componentCalendar aclsForUser: userLogin] containsObject: SOGoRole_ObjectEraser]);
|
||||
}
|
||||
|
||||
//
|
||||
//- (NSString *) emailAlarmsEnabled
|
||||
//{
|
||||
|
||||
Reference in New Issue
Block a user