{"action":"opened","issue":{"url":"https://api.github.com/repos/zimme/meteor-collection-behaviours/issues/21","repository_url":"https://api.github.com/repos/zimme/meteor-collection-behaviours","labels_url":"https://api.github.com/repos/zimme/meteor-collection-behaviours/issues/21/labels{/name}","comments_url":"https://api.github.com/repos/zimme/meteor-collection-behaviours/issues/21/comments","events_url":"https://api.github.com/repos/zimme/meteor-collection-behaviours/issues/21/events","html_url":"https://github.com/zimme/meteor-collection-behaviours/issues/21","id":157720621,"number":21,"title":"Cross-behaviours","user":{"login":"nicooprat","id":645641,"avatar_url":"https://avatars.githubusercontent.com/u/645641?v=3","gravatar_id":"","url":"https://api.github.com/users/nicooprat","html_url":"https://github.com/nicooprat","followers_url":"https://api.github.com/users/nicooprat/followers","following_url":"https://api.github.com/users/nicooprat/following{/other_user}","gists_url":"https://api.github.com/users/nicooprat/gists{/gist_id}","starred_url":"https://api.github.com/users/nicooprat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicooprat/subscriptions","organizations_url":"https://api.github.com/users/nicooprat/orgs","repos_url":"https://api.github.com/users/nicooprat/repos","events_url":"https://api.github.com/users/nicooprat/events{/privacy}","received_events_url":"https://api.github.com/users/nicooprat/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-05-31T16:58:12Z","updated_at":"2016-05-31T16:58:12Z","closed_at":null,"body":"Would be interesting to be able to create \"cross-behaviours\" code.\r\n\r\nFor example, I'm creating a behaviour which will check if the current user is the owner of a document before updating or removing it. It would be interesting that, in the definition on this behaviour, I could see if the \"timestampable\" behaviour has already been attached. If yes, I could check for the `createdAt` field by default (or the field the developer specified in the options). If not, developer should specify which field to check.\r\n\r\nPerhaps it would be enough to add some data to `this.collection` with behaviours already attached and specified options. Just need to be sure that behaviours are attached in the right order I guess.\r\n\r\nHope I'm clear! Just an idea, you may have a better solution :) "}}
{"actor":{"display_login":"nicooprat"}}