// HasPermission check if current user has permission for the action
HasPermission check if current user has permission for the action
// HasPermission check if current user has permission for the action
func (action Action) HasPermission(mode roles.PermissionMode, context *qor.Context) bool {
	if action.Permission != nil {
		var roles = []interface{}{}
		for _, role := range context.Roles {
			roles = append(roles, role)
		}
		return action.Permission.HasPermission(mode, roles...)
	}
	return true
}
func ( action Action ) HasPermission ( mode roles . PermissionMode , context * qor . Context ) bool { if action . Permission != nil { var roles = [ ] interface { } { } for _ , role := range context . Roles { roles = append ( roles , role ) } return action . Permission . HasPermission ( mode , roles ... ) } return true }
HasPermission check if current user has permission for the action
HasPermission check if current user has permission for the action