mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-29 08:49:27 +00:00
Monotone-Parent: 7342d9cd31675160736e0f2db8a83047d9babea9
Monotone-Revision: 4ebf80607b2a71f3b2192bd3ba8c310f15bd37f5 Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2007-10-09T17:57:27 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
77
SOPE/sope-gdl1/GDLContentStore/GNUmakefile
Normal file
77
SOPE/sope-gdl1/GDLContentStore/GNUmakefile
Normal file
@@ -0,0 +1,77 @@
|
||||
# GNUstep makefiles
|
||||
|
||||
include ../../../config.make
|
||||
include $(GNUSTEP_MAKEFILES)/common.make
|
||||
include ./Version
|
||||
|
||||
GNUSTEP_INSTALLATION_DIR = ${GNUSTEP_LOCAL_ROOT}
|
||||
|
||||
ifneq ($(frameworks),yes)
|
||||
LIBRARY_NAME = libGDLContentStore
|
||||
else
|
||||
FRAMEWORK_NAME = GDLContentStore
|
||||
endif
|
||||
|
||||
libGDLContentStore_PCH_FILE = common.h
|
||||
libGDLContentStore_SOVERSION=$(MAJOR_VERSION).$(MINOR_VERSION)
|
||||
libGDLContentStore_VERSION=$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBMINOR_VERSION)
|
||||
|
||||
TOOL_NAME = gcs_ls gcs_mkdir gcs_cat gcs_recreatequick gcs_gensql
|
||||
|
||||
libGDLContentStore_HEADER_FILES_DIR = .
|
||||
libGDLContentStore_HEADER_FILES_INSTALL_DIR = /GDLContentStore
|
||||
FHS_HEADER_FILES_INSTALL_DIR = $(libGDLContentStore_HEADER_FILES_INSTALL_DIR)
|
||||
|
||||
libGDLContentStore_HEADER_FILES += \
|
||||
NSURL+GCS.h \
|
||||
EOAdaptorChannel+GCS.h \
|
||||
\
|
||||
GCSContext.h \
|
||||
GCSFieldInfo.h \
|
||||
GCSFolder.h \
|
||||
GCSFolderManager.h \
|
||||
GCSFolderType.h \
|
||||
GCSChannelManager.h \
|
||||
GCSFieldExtractor.h \
|
||||
GCSStringFormatter.h \
|
||||
|
||||
libGDLContentStore_OBJC_FILES += \
|
||||
NSURL+GCS.m \
|
||||
EOAdaptorChannel+GCS.m \
|
||||
EOQualifier+GCS.m \
|
||||
\
|
||||
GCSContext.m \
|
||||
GCSFieldInfo.m \
|
||||
GCSFolder.m \
|
||||
GCSFolderManager.m \
|
||||
GCSFolderType.m \
|
||||
GCSChannelManager.m \
|
||||
GCSFieldExtractor.m \
|
||||
GCSStringFormatter.m \
|
||||
|
||||
gcs_ls_OBJC_FILES += gcs_ls.m
|
||||
gcs_mkdir_OBJC_FILES += gcs_mkdir.m
|
||||
gcs_cat_OBJC_FILES += gcs_cat.m
|
||||
gcs_gensql_OBJC_FILES += gcs_gensql.m
|
||||
gcs_recreatequick_OBJC_FILES += gcs_recreatequick.m
|
||||
|
||||
|
||||
# framework support
|
||||
|
||||
GDLContentStore_PCH_FILE = $(libGDLContentStore_PCH_FILE)
|
||||
GDLContentStore_HEADER_FILES = $(libGDLContentStore_HEADER_FILES)
|
||||
GDLContentStore_OBJC_FILES = $(libGDLContentStore_OBJC_FILES)
|
||||
GDLContentStore_SUBPROJECTS = $(libGDLContentStore_SUBPROJECTS)
|
||||
|
||||
|
||||
# building
|
||||
|
||||
-include GNUmakefile.preamble
|
||||
ifneq ($(frameworks),yes)
|
||||
include $(GNUSTEP_MAKEFILES)/library.make
|
||||
else
|
||||
include $(GNUSTEP_MAKEFILES)/framework.make
|
||||
endif
|
||||
include $(GNUSTEP_MAKEFILES)/tool.make
|
||||
-include GNUmakefile.postamble
|
||||
include fhs.make
|
||||
78
SOPE/sope-gdl1/GDLContentStore/GNUmakefile.preamble
Normal file
78
SOPE/sope-gdl1/GDLContentStore/GNUmakefile.preamble
Normal file
@@ -0,0 +1,78 @@
|
||||
# compilation settings
|
||||
|
||||
SOPE_ROOT=../..
|
||||
|
||||
ADDITIONAL_CPPFLAGS += -Wall
|
||||
|
||||
ADDITIONAL_INCLUDE_DIRS += -I. -I..
|
||||
|
||||
|
||||
# dependencies
|
||||
|
||||
libGDLContentStore_LIBRARIES_DEPEND_UPON += \
|
||||
-lGDLAccess \
|
||||
-lNGExtensions -lEOControl \
|
||||
-lDOM -lSaxObjC
|
||||
|
||||
GDLContentStore_LIBRARIES_DEPEND_UPON += \
|
||||
-framework GDLAccess \
|
||||
-framework NGExtensions -framework EOControl \
|
||||
-framework DOM -framework SaxObjC
|
||||
|
||||
ifneq ($(frameworks),yes)
|
||||
GCS_TOOL_LIBS += \
|
||||
-lGDLContentStore -lGDLAccess \
|
||||
-lNGExtensions -lEOControl \
|
||||
-lDOM -lSaxObjC
|
||||
else
|
||||
GCS_TOOL_LIBS += \
|
||||
-framework GDLContentStore -framework GDLAccess \
|
||||
-framework NGExtensions -framework EOControl \
|
||||
-framework DOM -framework SaxObjC
|
||||
endif
|
||||
|
||||
gcs_ls_TOOL_LIBS += $(GCS_TOOL_LIBS)
|
||||
gcs_mkdir_TOOL_LIBS += $(GCS_TOOL_LIBS)
|
||||
gcs_cat_TOOL_LIBS += $(GCS_TOOL_LIBS)
|
||||
gcs_recreatequick_TOOL_LIBS += $(GCS_TOOL_LIBS)
|
||||
gcs_gensql_TOOL_LIBS += $(GCS_TOOL_LIBS)
|
||||
|
||||
gcs_ls_PCH_FILE += common.h
|
||||
gcs_mkdir_PCH_FILE += common.h
|
||||
gcs_cat_PCH_FILE += common.h
|
||||
gcs_recreatequick_PCH_FILE += common.h
|
||||
gcs_gensql_PCH_FILE += common.h
|
||||
|
||||
|
||||
# library/framework search pathes
|
||||
|
||||
DEP_DIRS = \
|
||||
. \
|
||||
../GDLAccess \
|
||||
$(SOPE_ROOT)/sope-core/NGExtensions \
|
||||
$(SOPE_ROOT)/sope-core/EOControl \
|
||||
$(SOPE_ROOT)/sope-xml/DOM \
|
||||
$(SOPE_ROOT)/sope-xml/SaxObjC
|
||||
|
||||
ifneq ($(frameworks),yes)
|
||||
ADDITIONAL_LIB_DIRS += \
|
||||
$(foreach dir,$(DEP_DIRS),\
|
||||
-L$(GNUSTEP_BUILD_DIR)/$(dir)/$(GNUSTEP_OBJ_DIR_NAME))
|
||||
else
|
||||
ADDITIONAL_LIB_DIRS += \
|
||||
$(foreach dir,$(DEP_DIRS),-F$(GNUSTEP_BUILD_DIR)/$(dir))
|
||||
endif
|
||||
|
||||
SYSTEM_LIB_DIR += $(CONFIGURE_SYSTEM_LIB_DIR)
|
||||
|
||||
|
||||
# platform specific settings
|
||||
|
||||
ifeq ($(FOUNDATION_LIB),apple)
|
||||
libGDLContentStore_PREBIND_ADDR="0xC7700000"
|
||||
libGDLContentStore_LDFLAGS += -seg1addr $(libGDLContentStore_PREBIND_ADDR)
|
||||
endif
|
||||
|
||||
ifeq ($(findstring openbsd3, $(GNUSTEP_HOST_OS)), openbsd3)
|
||||
GCS_TOOL_LIBS += -liconv
|
||||
endif
|
||||
@@ -31,6 +31,7 @@
|
||||
#import <NGObjWeb/WORequest.h>
|
||||
#import <NGObjWeb/WOResponse.h>
|
||||
#import <NGObjWeb/SoSecurityManager.h>
|
||||
#import <NGObjWeb/SoClassSecurityInfo.h>
|
||||
|
||||
#import <SoObjects/SOGo/LDAPUserManager.h>
|
||||
#import <SoObjects/SOGo/NSArray+Utilities.h>
|
||||
@@ -146,7 +147,34 @@
|
||||
|
||||
- (WOResponse *) canAccessContentAction
|
||||
{
|
||||
return [self responseWith204];
|
||||
#warning IMPROVEMENTS REQUIRED!
|
||||
NSArray *acls;
|
||||
// NSEnumerator *userAcls;
|
||||
// NSString *currentAcl;
|
||||
|
||||
[self _setupContext];
|
||||
|
||||
// NSLog(@"canAccessContentAction %@, owner %@", subscriptionPointer, owner);
|
||||
|
||||
if ([login isEqualToString: owner] || [owner isEqualToString: @"nobody"]) {
|
||||
return [self responseWith204];
|
||||
}
|
||||
else {
|
||||
acls = [clientObject aclsForUser: login];
|
||||
// userAcls = [acls objectEnumerator];
|
||||
// currentAcl = [userAcls nextObject];
|
||||
// while (currentAcl) {
|
||||
// NSLog(@"ACL login %@, owner %@, folder %@: %@",
|
||||
// login, owner, baseFolder, currentAcl);
|
||||
// currentAcl = [userAcls nextObject];
|
||||
// }
|
||||
if (([[clientObject folderType] isEqualToString: @"Contact"] && [acls containsObject: SOGoRole_ObjectReader]) ||
|
||||
([[clientObject folderType] isEqualToString: @"Appointment"] && [acls containsObject: SOGoRole_AuthorizedSubscriber])) {
|
||||
return [self responseWith204];
|
||||
}
|
||||
}
|
||||
|
||||
return [self responseWithStatus: 403];
|
||||
}
|
||||
|
||||
- (WOResponse *) _realFolderActivation: (BOOL) makeActive
|
||||
|
||||
@@ -46,8 +46,8 @@ function openContactsFolder(contactsFolder, reload, idx) {
|
||||
var contactsList = $("contactsList");
|
||||
if (contactsList)
|
||||
selection = contactsList.getSelectedRowsId();
|
||||
else
|
||||
window.alert("no contactsList");
|
||||
// else
|
||||
// window.alert("no contactsList");
|
||||
}
|
||||
else
|
||||
selection = null;
|
||||
|
||||
@@ -141,6 +141,8 @@ function openMessageWindowsForSelection(action, firstOnly) {
|
||||
ApplicationBaseURL + currentMailbox
|
||||
+ "/" + rows[i].substr(4)
|
||||
+ "/" + action);
|
||||
} else {
|
||||
window.alert(labels["Please select a message."]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -232,6 +234,7 @@ function uixDeleteSelectedMessages(sender) {
|
||||
url = ApplicationBaseURL + messageId + "/trash";
|
||||
http = createHTTPClient();
|
||||
http.open("POST", url, false /* not async */);
|
||||
http.url = url;
|
||||
http.send("");
|
||||
if (!isHttpStatus204(http.status)) { /* request failed */
|
||||
failCount++;
|
||||
@@ -246,9 +249,8 @@ function uixDeleteSelectedMessages(sender) {
|
||||
}
|
||||
}
|
||||
http = null;
|
||||
|
||||
|
||||
/* remove from page */
|
||||
|
||||
/* line-through would be nicer, but hiding is OK too */
|
||||
var row = $(rowIds[i]);
|
||||
row.parentNode.removeChild(row);
|
||||
|
||||
Reference in New Issue
Block a user