git ssb

4+

Dominic / scuttlebot



Tree: 4bbdcb0f89770891b04720e98b31f99295fe0d13

Files: 4bbdcb0f89770891b04720e98b31f99295fe0d13 / plugins / master.js

382 bytesRaw
1// master plugin
2// allows you to define "master" IDs in the config
3// which are given the full rights of the local main ID
4module.exports = function (api, opts) {
5 var masters = [api.id].concat(opts.master).filter(Boolean)
6 api.auth.hook(function (fn, args) {
7 var id = args[0]
8 var cb = args[1]
9 cb(null, ~masters.indexOf(id) ? {allow: null, deny: null} : null)
10 })
11}
12

Built with git-ssb-web