Monotone-Parent: 8641791497cbe0e199fc4b68731683dd533ce48e

Monotone-Revision: 8d583d2e8977d0d63e028818f6f961246d256bdd

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2011-12-09T14:53:44
This commit is contained in:
Wolfgang Sourdeau
2011-12-09 14:53:44 +00:00
parent 1918939a8c
commit 7ec440bbc1
4 changed files with 92 additions and 49 deletions
+39
View File
@@ -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