         }
         
         // optionally filter results
+        
         if self.permissionsEnabled {
             
             var filteredResults = [NSManagedObject]()

    func server(Server, didPerformRequest request: ServerRequest, withResponse response: ServerResponse, userInfo: [ServerUserInfoKey: AnyObject])
    
    /** Asks the delegate for access control for a request. Server must have its permissions enabled for this method to be called. */
    func server(Server, permissionForRequest request: ServerRequest, managedObject: NSManagedObject?, context: NSManagedObjectContext?, key: String?)
}

// MARK: - Enumerations

        
        let sortDescriptorsJSONArray = sortDescriptorsJSONArrayObject as? [[String: Bool]]
        
        // empty mutable array
        var sortDescriptors = [NSSortDescriptor]()
        
        if sortDescriptorsJSONArrayObject != nil {
            
            // validate
            if (sortDescriptorsJSONArray == nil || sortDescriptorsJSONArray?.isEmpty != nil) {
