diff --git a/SOPE/sope-gdl1/GDLContentStore/GNUmakefile b/SOPE/sope-gdl1/GDLContentStore/GNUmakefile new file mode 100644 index 000000000..85b394e8c --- /dev/null +++ b/SOPE/sope-gdl1/GDLContentStore/GNUmakefile @@ -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 diff --git a/SOPE/sope-gdl1/GDLContentStore/GNUmakefile.preamble b/SOPE/sope-gdl1/GDLContentStore/GNUmakefile.preamble new file mode 100644 index 000000000..ada5aa195 --- /dev/null +++ b/SOPE/sope-gdl1/GDLContentStore/GNUmakefile.preamble @@ -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 diff --git a/UI/Common/UIxFolderActions.m b/UI/Common/UIxFolderActions.m index 943fbafe4..1c2d59b05 100644 --- a/UI/Common/UIxFolderActions.m +++ b/UI/Common/UIxFolderActions.m @@ -31,6 +31,7 @@ #import #import #import +#import #import #import @@ -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 diff --git a/UI/WebServerResources/ContactsUI.js b/UI/WebServerResources/ContactsUI.js index 2454f426d..15921f4e1 100644 --- a/UI/WebServerResources/ContactsUI.js +++ b/UI/WebServerResources/ContactsUI.js @@ -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; diff --git a/UI/WebServerResources/MailerUI.js b/UI/WebServerResources/MailerUI.js index e8af8051a..265552f4a 100644 --- a/UI/WebServerResources/MailerUI.js +++ b/UI/WebServerResources/MailerUI.js @@ -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);