Method
storeAppendingRole
(role models.Role, username string, guid string, isAdmin bool)
Source from the content-addressed store, hash-verified
| 78 | } |
| 79 | |
| 80 | func (coll userCollection) storeAppendingRole(role models.Role, username string, guid string, isAdmin bool) { |
| 81 | u := coll[username] |
| 82 | u.Roles = append(u.Roles, role) |
| 83 | u.Username = username |
| 84 | u.GUID = guid |
| 85 | u.IsAdmin = isAdmin |
| 86 | coll[username] = u |
| 87 | } |
| 88 | |
| 89 | func (coll userCollection) all() (output []userWithRoles) { |
| 90 | for _, u := range coll { |
Tested by
no test coverage detected