func HandleDeleteRole(
	user *graylog.User, lgc *logic.Logic,
	w http.ResponseWriter, r *http.Request, ps httprouter.Params,
) (interface{}, int, error) {
	// DELETE /roles/{rolename} Remove the named role and dissociate any users from it
	name := ps.ByName("rolename")
	if sc, err := lgc.Authorize(user, "roles:delete", name); err != nil {
		return nil, sc, err
	}
	sc, err := lgc.DeleteRole(name)
	if err != nil {
		return nil, sc, err
	}
	if err := lgc.Save(); err != nil {
		return nil, 500, err
	}
	return nil, sc, nil
}
// HandleDeleteRole is the handler of Delete Role API.
HandleDeleteRole is the handler of Delete Role API.
// HandleDeleteRole is the handler of Delete Role API .
func HandleDeleteRole(
	user *graylog.User, lgc *logic.Logic,
	w http.ResponseWriter, r *http.Request, ps httprouter.Params,
) (interface{}, int, error) {
	name := ps.ByName("rolename")
	if sc, err := lgc.Authorize(user, "roles:delete", name); err != nil {
		return nil, sc, err
	}
	sc, err := lgc.DeleteRole(name)
	if err != nil {
		return nil, sc, err
	}
	if err := lgc.Save(); err != nil {
		return nil, 500, err
	}
	return nil, sc, nil
}
func HandleDeleteRole ( user * graylog . User , lgc * logic . Logic , w http . ResponseWriter , r * http . Request , ps httprouter . Params , ) ( interface { } , int , error ) { name := ps . ByName ( " " ) if sc , err := lgc . Authorize ( user , " " , name ) ; err != nil { return nil , sc , err } sc , err := lgc . DeleteRole ( name ) if err != nil { return nil , sc , err } if err := lgc . Save ( ) ; err != nil { return nil , 500 , err } return nil , sc , nil }
HandleDeleteRole is the handler of Delete Role API.
HandleDeleteRole is the handler of Delete Role API .
// DELETE /roles/{rolename} Remove the named role and dissociate any users from it