Some labels make their events publicly visible.
This could be implemented something like:
Computing event visibility could happen after the mongodb query, something like:
public_label_names = {label.name for label in db.Label.objects(public=True)}
results = [event for event in results if not set(event.labels).isdisjoint(public_label_names) ]
This isn't terribly efficient, but it's probably adequate, and if the server is getting hammered by outside visitors we probably want a more generic caching layer anyway.
This task should also propose the set of label (Featured? Academic Calendar? Collaboratory?) that have public visibility.
Some labels make their events publicly visible.
This could be implemented something like:
visibility: "public"field to labelspublic = BooleanField()to classLabel(Document)"public": fields.Booleantolabel_modelinlabel_resources.pyComputing event visibility could happen after the mongodb query, something like:
This isn't terribly efficient, but it's probably adequate, and if the server is getting hammered by outside visitors we probably want a more generic caching layer anyway.
This task should also propose the set of label (Featured? Academic Calendar? Collaboratory?) that have public visibility.