From ca725a4dbddc196ffd79ceb3e76f271648e51fd3 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Mon, 19 Nov 2007 22:34:31 +0000 Subject: [PATCH] Monotone-Parent: efb32ee0b07634ff28f86f07c618160d8d121225 Monotone-Revision: 1af71f130ccb8d21bb16f766da69f735eac5f36b Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-11-19T22:34:31 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 8 ++++++++ SoObjects/SOGo/SOGoUser.h | 4 ++++ SoObjects/SOGo/SOGoUser.m | 10 ++++++++++ UI/Common/UIxPageFrame.m | 5 +++++ UI/Templates/UIxPageFrame.wox | 8 +++++++- 5 files changed, 34 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 23b0df7ad..6a2fb10b3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2007-11-19 Wolfgang Sourdeau + * UI/Common/UIxPageFrame.m ([UIxPageFrame -isSuperUser]): new + accessor that forwards the call to the active user. + + * SoObjects/SOGo/SOGoUser.m ([SOGoUser -signature]): returns the + user default signature. + ([SOGoUser -isSuperUser]): declares whether the user is listed + among the super users. + * UI/Scheduler/UIxComponentEditor.m ([UIxComponentEditor -setComponent:newComponent]): retain the component object. ([UIxComponentEditor -organizerIdentity]): new accessor method to diff --git a/SoObjects/SOGo/SOGoUser.h b/SoObjects/SOGo/SOGoUser.h index 64e1f8a03..d8f80102e 100644 --- a/SoObjects/SOGo/SOGoUser.h +++ b/SoObjects/SOGo/SOGoUser.h @@ -120,6 +120,10 @@ extern NSString *SOGoWeekStartFirstFullWeek; - (NSString *) messageForwarding; - (NSString *) messageCheck; +- (NSString *) signature; + +- (BOOL) isSuperUser; + /* folders */ - (SOGoUserFolder *) homeFolderInContext: (id) context; diff --git a/SoObjects/SOGo/SOGoUser.m b/SoObjects/SOGo/SOGoUser.m index e81214d5e..ee1233596 100644 --- a/SoObjects/SOGo/SOGoUser.m +++ b/SoObjects/SOGo/SOGoUser.m @@ -501,6 +501,11 @@ NSString *SOGoWeekStartFirstFullWeek = @"FirstFullWeek"; return [[defaultAccount objectForKey: @"identities"] objectAtIndex: 0]; } +- (NSString *) signature +{ + return [[self primaryIdentity] objectForKey: @"signature"]; +} + - (NSString *) messageForwarding { NSString *messageForwarding; @@ -612,4 +617,9 @@ NSString *SOGoWeekStartFirstFullWeek = @"FirstFullWeek"; && [login isEqualToString: [otherUser login]]); } +- (BOOL) isSuperUser +{ + return [superUsernames containsObject: login]; +} + @end /* SOGoUser */ diff --git a/UI/Common/UIxPageFrame.m b/UI/Common/UIxPageFrame.m index 9aaa5df61..fda77e28b 100644 --- a/UI/Common/UIxPageFrame.m +++ b/UI/Common/UIxPageFrame.m @@ -335,6 +335,11 @@ return toolbar; } +- (BOOL) isSuperUser +{ + return [[context activeUser] isSuperUser]; +} + /* browser/os identification */ - (BOOL) isCompatibleBrowser diff --git a/UI/Templates/UIxPageFrame.wox b/UI/Templates/UIxPageFrame.wox index e6dbf22e7..ef1a2d6f0 100644 --- a/UI/Templates/UIxPageFrame.wox +++ b/UI/Templates/UIxPageFrame.wox @@ -73,8 +73,14 @@