IsAdmin reports whether the current client has admin access.
(ctx iris.Context)
| 130 | |
| 131 | // IsAdmin reports whether the current client has admin access. |
| 132 | func IsAdmin(ctx iris.Context) bool { |
| 133 | for _, role := range GetClaims(ctx).Roles { |
| 134 | if role == model.Admin { |
| 135 | return true |
| 136 | } |
| 137 | } |
| 138 | |
| 139 | return false |
| 140 | } |
no test coverage detected
searching dependent graphs…