code: func (res *Resource) HasPermission(mode roles.PermissionMode, context *qor.Context) bool {
  	if res == nil || res.Permission == nil {
  		return true
  	}
  
  	var roles = []interface{}{}
  	for _, role := range context.Roles {
  		roles = append(roles, role)
  	}
  	return res.Permission.HasPermission(mode, roles...)
  }
docs: // HasPermission check permission of resource