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

Method Check

shock-server/node/acl/acl.go:145–157  ·  view source on GitHub ↗
(str string)

Source from the content-addressed store, hash-verified

143}
144
145func (a *Acl) Check(str string) (r Rights) {
146 r = Rights{"read": false, "write": false, "delete": false}
147 acls := map[string][]string{"read": a.Read, "write": a.Write, "delete": a.Delete}
148 for k, v := range acls {
149 for _, id := range v {
150 if str == id {
151 r[k] = true
152 break
153 }
154 }
155 }
156 return
157}
158
159func del(arr []string, s string) (narr []string) {
160 narr = []string{}

Callers 8

ReplaceMethod · 0.80
DeleteMethod · 0.80
CreateMethod · 0.80
ReadMethod · 0.80
IndexTypedRequestFunction · 0.80
AclRequestFunction · 0.80
AclTypedRequestFunction · 0.80
CreateNodeUploadFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected