(str string, r Rights)
| 130 | } |
| 131 | |
| 132 | func (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 | |
| 145 | func (a *Acl) Check(str string) (r Rights) { |
| 146 | r = Rights{"read": false, "write": false, "delete": false} |