code: func AdminUpdateUserPermissions(c *m.ReqContext, form dtos.AdminUpdateUserPermissionsForm) {
  	userID := c.ParamsInt64(":id")
  
  	cmd := m.UpdateUserPermissionsCommand{
  		UserId:         userID,
  		IsGrafanaAdmin: form.IsGrafanaAdmin,
  	}
  
  	if err := bus.Dispatch(&cmd); err != nil {
  		if err == m.ErrLastGrafanaAdmin {
  			c.JsonApiErr(400, m.ErrLastGrafanaAdmin.Error(), nil)
  			return
  		}
  
  		c.JsonApiErr(500, "Failed to update user permissions", err)
  		return
  	}
  
  	c.JsonOK("User permissions updated")
  }
docs: // PUT /api/admin/users/:id/permissions