-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
First off, awesome module! I think I'm running into some issues when I'm grabbing subject role mappings w/ this example code:
var relations = require('relations');
var redis = require('redis');
client = redis.createClient();
relations.use(relations.stores.redis, {client: client});
relations.define('repo', {
owner: ['pull', 'push', 'administrate'],
collaborator: ['pull', 'push']
});
relations.repo('%s is the owner of %s', 'ross', 'testrepo');
relations.repo('%s is the collaborator of %s', 'ross', 'testrepo');
relations.repo('explain who can act on testrepo', function(err, res) {
console.log(res);
});which gives
test$ node index.js
{ testrepo: [ 'collaborator', 'owner' ] }
Which seems to have the object as the subject?
In the redis tests I see prefix has a : in the prefix name (https://github.com/carlos8f/node-relations/blob/master/test/basic.js#L12)
and they seem to be parsed that way as well (https://github.com/carlos8f/node-relations/blob/master/stores/redis.js#L212). Should prefixes contain colons?
Thanks!
Metadata
Metadata
Assignees
Labels
No labels