Group :: Sistema/Servidores
RPM: foreman
Main Changelog Spec Patches Sources Download Gear Bugs e FR Repocop
Patch: invalid_premission.patch
Download
Download
commit d7efc462e5018f55d5ce928836d433c5629dd808
Author: Pavel Skrylev <majioa@altlinux.org>
Date: Fri Oct 29 21:09:09 2021 +0300
fix: when invalid permisstions exception is thrown
! when invalid permisstions exception is thrown
diff --git a/app/models/role.rb b/app/models/role.rb
index 7add7585d..a8c97f3fb 100644
--- a/app/models/role.rb
+++ b/app/models/role.rb
@@ -333,7 +333,7 @@ class Role < ApplicationRecord
collection = Permission.where(:name => perms).all
if collection.size != perms.size
raise ::Foreman::PermissionMissingException.new(N_("some permissions were not found: %s"),
- not_found_permissions(collection.pluck(:name), perms))
+ not_found_permissions(collection.pluck(:name).map(&:to_sym), perms))
end
collection
end