// SetPrivs sets the privileges for the Peer
SetPrivs sets the privileges for the Peer
// SetPrivs sets the privileges for the Peer
func (p *Peer) SetPrivs(privs map[string]bool) error {
	db, err := initAuthDB()
	if err != nil {
		return err
	}
	defer db.Close()
	err = modPrivItem(db, string(p.username), encodePrivs(privs))
	if err != nil {
		return err
	}
	return nil
}
func ( p * Peer ) SetPrivs ( privs map [ string ] bool ) error { db , err := initAuthDB ( ) if err != nil { return err } defer db . Close ( ) err = modPrivItem ( db , string ( p . username ) , encodePrivs ( privs ) ) if err != nil { return err } return nil }
SetPrivs sets the privileges for the Peer
SetPrivs sets the privileges for the Peer