mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
15 lines
432 B
TypeScript
15 lines
432 B
TypeScript
// https://github.com/OptimalBits/node_acl/blob/master/Readme.md
|
|
import Acl = require('acl');
|
|
import redis = require('redis');
|
|
|
|
declare var client: redis.RedisClient;
|
|
|
|
// Using the redis backend
|
|
var acl = new Acl(new Acl.redisBackend(client, 'acl_'));
|
|
|
|
// guest is allowed to view blogs
|
|
acl.allow('guest', 'blogs', 'view');
|
|
|
|
// allow function accepts arrays as any parameter
|
|
acl.allow('member', 'blogs', ['edit','view', 'delete']);
|