Drop metadata attr

Fixes #26
This commit is contained in:
Matthew Dillon 2015-11-13 13:08:08 -07:00
parent 9b36644a31
commit a482a083bf
14 changed files with 13 additions and 86 deletions

View file

@ -88,11 +88,6 @@ func GetClaims(r *http.Request) types.Claims {
return claims
}
// CanAdd is an authorization helper for adding new entities
func CanAdd(claims *types.Claims) bool {
return claims.Role == "A" || claims.Role == "W"
}
// CanEdit is an authorization helper for editing entities
func CanEdit(claims *types.Claims, author int64) bool {
return claims.Sub == author || claims.Role == "A"