Cookie strips down an AuthUser to contain only information necessary for cookies.
()
| 121 | // Cookie strips down an AuthUser to contain only information necessary for |
| 122 | // cookies. |
| 123 | func (u User) Cookie() *User { |
| 124 | u.HashedPass = []byte{} |
| 125 | |
| 126 | return &u |
| 127 | } |
| 128 | |
| 129 | func (u *User) IsAdmin() bool { |
| 130 | // TODO: get this from database |
no outgoing calls
no test coverage detected