Permission checker working
If user does not have 'read' permission, 403 error is thrown instead of returning the doc
If a document if published, requestor will have 'read' permission even if they are not authenticated.
Added server base controller method to publish content (untested)
Fixed bug where 403 was begin thrown even when read access was granted
Added route + controller method to publish an Event
Created function to ascertain both basic permissions and user permissions at once
Added static methods to base content model + Event model to retrieve the names of permissions
getByQuery permission check using Model permission name instead of hardcoded string.
Implemented permissions check for all baseController (server) methods except for list
requiresLogin middleware throws authentication error instead of authorization error
Removed mean.io permission check from Event router
When a document is created, creator is assigned read and update permissions.
Implemented logic to generate field-level access permissions
Implemented field-level permission check of user permissions on document update.
Added method to remove fields for which the user does not have read access before sending response. Said method is used in baseController.show
Changed structure of field-level permissions such that each field has a read and update permission
Added a base permission for reading lists of content (separate from 'read' permission)
Preventing possible NPE in ascertainUserPermissions. Updated some error messages to be more accurate/descriptive.
Added method to build a mongo select statement based on fields that user has permission to view. Using said method in baseController.all