Bug #32026
Saving invalid cloned role ends up with Internal server error
Status:
Closed
Priority:
Normal
Assignee:
Category:
Users, Roles and Permissions
Target version:
-
Difficulty:
Triaged:
Yes
Bugzilla link:
Pull request:
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1934427
Description of problem:
Error message displayed when cloning a role without supplying name:
Oops, we're sorry but something went wrong undefined method `id' for nil:NilClass
How reproducible:
always
Steps to Reproduce:
1. In Foreman UI: Administer > Roles
2. Pick a role, select Clone from the dropdown
3. Don't input any information in the form and click Submit
Actual results:
Red box with the aforementioned error
Expected results:
Information about the required field
Additional info:
Related issues
Associated revisions
History
#1
Updated by Ondřej Ezr about 2 years ago
- Triaged changed from No to Yes
- Target version set to 2.4.1
- Category set to Users, Roles and Permissions
- Subject changed from Saving invalid cloned role ends up with 500. to Saving invalid cloned role ends up with Internal server error
#2
Updated by Ondřej Ezr about 2 years ago
- Found in Releases 2.3.3 added
#3
Updated by The Foreman Bot about 2 years ago
- Assignee set to Ondřej Ezr
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/8369 added
#4
Updated by Ondřej Ezr about 2 years ago
- Related to Bug #21545: Role cloning treats taxonomies differently in UI and API added
#5
Updated by The Foreman Bot about 2 years ago
- Fixed in Releases 2.5.0 added
#6
Updated by Ondřej Ezr about 2 years ago
- Status changed from Ready For Testing to Closed
Applied in changeset foreman|d5301b08c6a4ce53af82c9f954d23041ca6fa9cb.
#7
Updated by Tomer Brisker about 2 years ago
- Fixed in Releases 2.4.0 added
- Fixed in Releases deleted (
2.5.0)
#8
Updated by Tomer Brisker about 2 years ago
- Target version deleted (
2.4.1)
Fixes #32026 - cloned role throws error 500 if invalid
In e61362d1a103b4fbd79c838a6bb6f01986ab02a9 we've accidently forgot about the create action, but now
save of invalid role would have end up with 500 error.
This moves to using `cloned_from_id` instead of `@original_role` as
source of the original role id as this information is easier to pass to
the form.