git ssb

4+

Dominic / scuttlebot



Tree: 862bba47be153d8955724bcb5e6b29a18d6ca29b

Files: 862bba47be153d8955724bcb5e6b29a18d6ca29b / 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