         }
         
         // check for permissions
-        
         if permissionsEnabled {
             
             if self.delegate?.server(self, permissionForRequest: request, managedObject: nil, context: context, key: nil).toRaw() < ServerPermission.EditPermission.toRaw() {

            
            var editStatusCode: ServerStatusCode?
            
            var newValues: [String: AnyObject]?
            
            let error = NSErrorPointer()
            
            context.performBlockAndWait({ () -> Void in
                
                editStatusCode = self.verifyEditResource(managedObject!, forRequest: request, context: context, newValues: newValues!, error: error)
            })
        }
        
        return (ServerResponse(statusCode: ServerStatusCode.BadRequest, JSONResponse: ""), [ServerUserInfoKey.ResourceID:0])
    }
    
    private func responseForGetRequest(request: ServerRequest) -> (ServerResponse, [ServerUserInfoKey: AnyObject]) {
        
        return (ServerResponse(statusCode: ServerStatusCode.BadRequest, JSONResponse: ""), [ServerUserInfoKey.ResourceID:0])
    }
    
    private func responseForEditRequest(request: ServerRequest) -> (ServerResponse, [ServerUserInfoKey: AnyObject]) {
        
        return (ServerResponse(statusCode: ServerStatusCode.BadRequest, JSONResponse: ""), [ServerUserInfoKey.ResourceID:0])
    }
    
    private func responseForDeleteRequest(request: ServerRequest) -> (ServerResponse, [ServerUserInfoKey: AnyObject]) {
        
        return (ServerResponse(statusCode: ServerStatusCode.BadRequest, JSONResponse: ""), [ServerUserInfoKey.ResourceID:0])
    }
    
    private func responseForFunctionRequest(request: ServerRequest) -> (ServerResponse, [ServerUserInfoKey: AnyObject]) {
        
        return (ServerResponse(statusCode: ServerStatusCode.BadRequest, JSONResponse: ""), [ServerUserInfoKey.ResourceID:0])
    }
    
    // MARK: - Internal Methods
    
    private func jsonWritingOption() -> NSJSONWritingOptions {

        var userInfo: [ServerUserInfoKey: AnyObject] = [ServerUserInfoKey.ManagedObjectContext: context]
        
        // ask delegate
        if self.delegate != nil {
            
            let statusCode = self.delegate?.server(self, statusCodeForRequest: request, managedObject: nil)
