MCPcopy Create free account
hub / github.com/MG-RAST/Shock / Set

Method Set

shock-server/node/acl/acl.go:132–143  ·  view source on GitHub ↗
(str string, r Rights)

Source from the content-addressed store, hash-verified

130}
131
132func (a *Acl) Set(str string, r Rights) {
133 if r["read"] {
134 a.Read = insert(a.Read, str)
135 }
136 if r["write"] {
137 a.Write = insert(a.Write, str)
138 }
139 if r["delete"] {
140 a.Delete = insert(a.Delete, str)
141 }
142 return
143}
144
145func (a *Acl) Check(str string) (r Rights) {
146 r = Rights{"read": false, "write": false, "delete": false}

Callers

nothing calls this directly

Calls 1

insertFunction · 0.85

Tested by

no test coverage detected