Monotone-Parent: 3b8627a8b52c86d059ada9c0387459d8654bb482

Monotone-Revision: 66fe156475b1f789bc5d20c857350ca9afea9556

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2007-11-09T16:40:15
Monotone-Branch: ca.inverse.sogo
maint-2.0.2
Wolfgang Sourdeau 2007-11-09 16:40:15 +00:00
parent b3bd3c5adf
commit 44190a2103
4 changed files with 28 additions and 24 deletions

View File

@ -1,5 +1,9 @@
2007-11-09 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* UI/SOGoUI/UIxComponent.m ([UIxComponent -canCreateOrModify]):
new boolean accessor that determines whether someone can create
(i.e. modify a new entry) or modify an existing entry.
* SoObjects/SOGo/SOGoObject.m ([SOGoObject
-lookupName:lookupNameinContext:localContextacquire:acquire]):
overriden method to bind looked up keys to So methods but by

View File

@ -158,25 +158,10 @@
protectedBy = "<public>";
pageName = "UIxContactView";
};
/* delete = {
protectedBy = "View";
pageName = "UIxContactView";
actionName = "delete";
}; */
edit = {
protectedBy = "Access Contents Information";
protectedBy = "<public>";
pageName = "UIxContactEditor";
};
/* save = {
protectedBy = "View";
pageName = "UIxContactEditor";
actionName = "save";
};
write = {
protectedBy = "View";
pageName = "UIxContactEditor";
actionName = "write";
}; */
};
};
};

View File

@ -35,11 +35,13 @@
#import <NGExtensions/NSString+misc.h>
#import <NGExtensions/NSURL+misc.h>
#import <SoObjects/SOGo/SOGoUser.h>
#import <SoObjects/SOGo/SOGoObject.h>
#import <SoObjects/SOGo/SOGoCustomGroupFolder.h>
#import <SoObjects/SOGo/NSCalendarDate+SOGo.h>
#import <SoObjects/SOGo/NSString+Utilities.h>
#import <SoObjects/SOGo/SOGoUser.h>
#import <SoObjects/SOGo/SOGoObject.h>
#import <SoObjects/SOGo/SOGoContentObject.h>
#import <SoObjects/SOGo/SOGoCustomGroupFolder.h>
#import <SoObjects/SOGo/SOGoPermissions.h>
#import "UIxJSClose.h"
@ -423,6 +425,18 @@ static BOOL uixDebugEnabled = NO;
return jsClose;
}
/* common conditions */
- (BOOL) canCreateOrModify
{
SoSecurityManager *sm;
sm = [SoSecurityManager sharedSecurityManager];
return (![sm validatePermission: SoPerm_ChangeImagesAndFiles
onObject: [self clientObject]
inContext: context]);
}
/* SoUser */
- (NSString *) shortUserNameForDisplay

View File

@ -335,11 +335,12 @@
</div>
</div>
<div id="buttons">
<input
type="submit"
class="button"
label:value="Save"
name="save:method" />
<var:if condition="canCreateOrModify"
><input
type="submit"
class="button"
label:value="Save"
name="save:method" /></var:if>
<input
type="submit"
class="button"