mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-18 18:05:36 +00:00
Monotone-Parent: 8641791497cbe0e199fc4b68731683dd533ce48e
Monotone-Revision: 8d583d2e8977d0d63e028818f6f961246d256bdd Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2011-12-09T14:53:44
This commit is contained in:
@@ -465,6 +465,45 @@ static NSMutableArray *abbrMonthLabelKeys = nil;
|
||||
return result;
|
||||
}
|
||||
|
||||
- (BOOL) userHasCalendarAccess
|
||||
{
|
||||
SOGoUser *user;
|
||||
|
||||
user = [context activeUser];
|
||||
|
||||
return [user canAccessModule: @"Calendar"];
|
||||
}
|
||||
|
||||
- (BOOL) userHasMailAccess
|
||||
{
|
||||
SOGoUser *user;
|
||||
|
||||
user = [context activeUser];
|
||||
|
||||
return [user canAccessModule: @"Mail"];
|
||||
}
|
||||
|
||||
#warning we might want to refine the tests here...
|
||||
- (BOOL) isCalendarEnabled
|
||||
{
|
||||
return [self userHasCalendarAccess] && ![self singleWindowModeEnabled];
|
||||
}
|
||||
|
||||
- (BOOL) isContactsEnabled
|
||||
{
|
||||
return ![self singleWindowModeEnabled];
|
||||
}
|
||||
|
||||
- (BOOL) isMailEnabled
|
||||
{
|
||||
return [self userHasMailAccess];
|
||||
}
|
||||
|
||||
- (BOOL) isPreferencesEnabled
|
||||
{
|
||||
return ![self singleWindowModeEnabled];
|
||||
}
|
||||
|
||||
/* SoUser */
|
||||
|
||||
- (NSString *) shortUserNameForDisplay
|
||||
|
||||
Reference in New Issue
Block a user