git ssb

4+

Dominic / scuttlebot



Tree: fd6d70a30dab618ef7610aa8d4df18b38eed8c25

Files: fd6d70a30dab618ef7610aa8d4df18b38eed8c25 / 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