Bugfixes for "me" ACL.
This commit is contained in:
@@ -256,7 +256,10 @@ class Subject(db.Model):
|
|||||||
raise e
|
raise e
|
||||||
event = obj.ToEvent()
|
event = obj.ToEvent()
|
||||||
for subscription in subscriptions:
|
for subscription in subscriptions:
|
||||||
subscription.SendMessage(event)
|
subscription.SendMessage(self.TranslateEvent(
|
||||||
|
event,
|
||||||
|
subscription.readable_only_by_me,
|
||||||
|
subscription.writable_only_by_me))
|
||||||
return self.TranslateEvent(event, readable_only_by_me, writable_only_by_me)
|
return self.TranslateEvent(event, readable_only_by_me, writable_only_by_me)
|
||||||
|
|
||||||
@db.transactional()
|
@db.transactional()
|
||||||
@@ -299,7 +302,10 @@ class Subject(db.Model):
|
|||||||
raise e
|
raise e
|
||||||
event = obj.ToEvent()
|
event = obj.ToEvent()
|
||||||
for subscription in subscriptions:
|
for subscription in subscriptions:
|
||||||
subscription.SendMessage(event)
|
subscription.SendMessage(self.TranslateEvent(
|
||||||
|
event,
|
||||||
|
subscription.readable_only_by_me,
|
||||||
|
subscription.writable_only_by_me))
|
||||||
return self.TranslateEvent(event, readable_only_by_me, writable_only_by_me)
|
return self.TranslateEvent(event, readable_only_by_me, writable_only_by_me)
|
||||||
|
|
||||||
@db.transactional()
|
@db.transactional()
|
||||||
@@ -391,7 +397,10 @@ class Subscription(db.Model):
|
|||||||
.filter('writable_only_by_me =', writable_only_by_me)
|
.filter('writable_only_by_me =', writable_only_by_me)
|
||||||
.fetch(1))
|
.fetch(1))
|
||||||
if not subscriptions:
|
if not subscriptions:
|
||||||
cls(parent=subject, instance=instance).put()
|
cls(parent=subject,
|
||||||
|
instance=instance,
|
||||||
|
readable_only_by_me=readable_only_by_me,
|
||||||
|
writable_only_by_me=writable_only_by_me).put()
|
||||||
return subject.GetEvents(messages, last_id, request)
|
return subject.GetEvents(messages, last_id, request)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
|||||||
@@ -1199,8 +1199,9 @@ Cosmopolite.prototype.onMessage_ = function(e) {
|
|||||||
console.log(
|
console.log(
|
||||||
this.loggingPrefix_(),
|
this.loggingPrefix_(),
|
||||||
'message from unrecognized subject:', e);
|
'message from unrecognized subject:', e);
|
||||||
console.log(this.subscriptions_);
|
console.log(
|
||||||
console.log(subjectString);
|
this.loggingPrefix_(),
|
||||||
|
'subscriptions:', this.subscriptions_);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
/** @type {boolean} */
|
/** @type {boolean} */
|
||||||
|
|||||||
Reference in New Issue
Block a user