MCPcopy Create free account
hub / github.com/git-bug/git-bug / HasAdministrator

Method HasAdministrator

entity/dag/example_test.go:39–46  ·  view source on GitHub ↗

HasAdministrator returns true if the given identity is included in the administrator.

(i identity.Interface)

Source from the content-addressed store, hash-verified

37
38// HasAdministrator returns true if the given identity is included in the administrator.
39func (snap *Snapshot) HasAdministrator(i identity.Interface) bool {
40 for admin, _ := range snap.Administrator {
41 if admin.Id() == i.Id() {
42 return true
43 }
44 }
45 return false
46}
47
48// Now, we will not edit this configuration directly. Instead, we are going to apply "operations" on it.
49// Those are the ones that will be stored and shared. Doing things that way allow merging concurrent editing

Callers 2

ApplyMethod · 0.80
ApplyMethod · 0.80

Calls 1

IdMethod · 0.65

Tested by

no test coverage detected