mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-15 08:25:25 +00:00
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:
@@ -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;
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user