Monotone-Parent: e7e44b2de3f556e55bfeb9b485ea6d66a7f93772

Monotone-Revision: 661c78a6b95a6fc152c41fa5888b92e92c73e92f

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2010-07-15T14:48:45
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2010-07-15 14:48:45 +00:00
parent 85b450a669
commit ba2271f7aa
2 changed files with 23 additions and 0 deletions
+4
View File
@@ -98,6 +98,10 @@
- (void) setOwner: (NSString *) newOwner;
- (NSString *) ownerInContext: (id) _ctx;
/* a helper that determines whether access rights can be ignored on
an object */
- (BOOL) ignoreRights;
/* looking up shared objects */
- (SOGoUserFolder *) lookupUserFolder;
+19
View File
@@ -229,6 +229,25 @@
return owner;
}
- (BOOL) ignoreRights
{
SOGoUser *currentUser;
NSString *login;
BOOL ignoreRights;
if (activeUserIsOwner)
ignoreRights = YES;
else
{
currentUser = [context activeUser];
login = [currentUser login];
ignoreRights = ([login isEqualToString: [self ownerInContext: context]]
|| [currentUser isSuperUser]);
}
return ignoreRights;
}
- (BOOL) isInPublicZone
{
if (!isInPublicZone)