Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(4)  |  Call(2)  |  Derive(0)  |  Import(2)

src/m/a/max-3.6/max/models/activity.py   max(Download)
from max.models.user import User
from max.models.context import Context
from max.rest.utils import canWriteInContexts, hasPermission
 
 
                wrapped_contexts.append(wrapped)
 
            result = result and canWriteInContexts(self.data['actor'], wrapped_contexts)
        if self.data.get('contexts', None) and isinstance(self.data['actor'], Context):
            result = result and self.data['actor']['url'] == self.data.get('contexts')[0]

src/m/a/max-3.6/max/models/message.py   max(Download)
# -*- coding: utf-8 -*-
from max.MADMax import MADMaxCollection
from max.models.activity import BaseActivity
from max.rest.utils import canWriteInContexts
 
            wrapped_contexts.append(wrapped)
 
        result = result and canWriteInContexts(self.data['actor'], wrapped_contexts)
        return result