From 6aa121c0f773903033198b9de1e3c09775beb5c9 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Fri, 4 May 2007 15:57:12 +0000 Subject: [PATCH] Monotone-Parent: 2de65de2856914b059bf9e9b6eafc6f4f5a5a4ec Monotone-Revision: 1cd01a11a7384ec7da33be5a6316e39e3024c38a Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-05-04T15:57:12 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 5 +++++ UI/Common/UIxAclEditor.m | 12 ++++++++++++ 2 files changed, 17 insertions(+) diff --git a/ChangeLog b/ChangeLog index bddc874fd..779e3b4cd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-05-04 Wolfgang Sourdeau + + * UI/Common/UIxAclEditor.m ([UIxAclEditor -currentUserIsOwner]): + new method with an explicit name. + 2007-05-03 Wolfgang Sourdeau * SoObjects/Appointments/SOGoCalendarComponent.m diff --git a/UI/Common/UIxAclEditor.m b/UI/Common/UIxAclEditor.m index 8c0e9df99..11466cebb 100644 --- a/UI/Common/UIxAclEditor.m +++ b/UI/Common/UIxAclEditor.m @@ -177,6 +177,18 @@ return [self jsCloseWithRefreshMethod: nil]; } +- (BOOL) currentUserIsOwner +{ + SOGoObject *clientObject; + NSString *currentUserLogin, *ownerLogin; + + clientObject = [self clientObject]; + ownerLogin = [clientObject ownerInContext: context]; + currentUserLogin = [[context activeUser] login]; + + return [ownerLogin isEqualToString: currentUserLogin]; +} + // - (id ) addUserInAcls // { // SOGoObject *clientObject;