func HandleGetRole(
	user *graylog.User, lgc *logic.Logic,
	w http.ResponseWriter, r *http.Request, ps httprouter.Params,
) (interface{}, int, error) {
	// GET /roles/{rolename} Retrieve permissions for a single role
	name := ps.ByName("rolename")
	lgc.Logger().WithFields(log.Fields{
		"handler": "handleGetRole", "rolename": name}).Info("request start")
	if sc, err := lgc.Authorize(user, "roles:read", name); err != nil {
		return nil, sc, err
	}
	return lgc.GetRole(name)
}
// HandleGetRole is the handler of GET Role API.
HandleGetRole is the handler of GET Role API.
// HandleGetRole is the handler of GET Role API .
func HandleGetRole(
	user *graylog.User, lgc *logic.Logic,
	w http.ResponseWriter, r *http.Request, ps httprouter.Params,
) (interface{}, int, error) {
	name := ps.ByName("rolename")
	lgc.Logger().WithFields(log.Fields{
		"handler": "handleGetRole", "rolename": name}).Info("request start")
	if sc, err := lgc.Authorize(user, "roles:read", name); err != nil {
		return nil, sc, err
	}
	return lgc.GetRole(name)
}
func HandleGetRole ( user * graylog . User , lgc * logic . Logic , w http . ResponseWriter , r * http . Request , ps httprouter . Params , ) ( interface { } , int , error ) { name := ps . ByName ( " " ) lgc . Logger ( ) . WithFields ( log . Fields { " " : " " , " " : name } ) . Info ( " " ) if sc , err := lgc . Authorize ( user , " " , name ) ; err != nil { return nil , sc , err } return lgc . GetRole ( name ) }
HandleGetRole is the handler of GET Role API.
HandleGetRole is the handler of GET Role API .
// GET /roles/{rolename} Retrieve permissions for a single role