// GetPrivs returns the privileges of the Peer
GetPrivs returns the privileges of the Peer
// GetPrivs returns the privileges of the Peer
func (p *Peer) GetPrivs() (map[string]bool, error) {
	db, err := initAuthDB()
	if err != nil {
		return nil, err
	}
	defer db.Close()
	eprivs, err := readPrivItem(db, string(p.username))
	if err != nil {
		return nil, err
	}
	return decodePrivs(eprivs), nil
}
func ( p * Peer ) GetPrivs ( ) ( map [ string ] bool , error ) { db , err := initAuthDB ( ) if err != nil { return nil , err } defer db . Close ( ) eprivs , err := readPrivItem ( db , string ( p . username ) ) if err != nil { return nil , err } return decodePrivs ( eprivs ) , nil }
GetPrivs returns the privileges of the Peer
GetPrivs returns the privileges of the Peer