Project

General

Profile

Actions

Bug #3530

closed

Unable to destroy a host when user have permissions to "destroy_hosts" but no premissions to "destroy_reports".

Added by Petter Hassberg over 10 years ago. Updated over 8 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Users, Roles and Permissions
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

When a user belongs to a group which have rights to

Hosts: destroy_hosts

But NO rights to:

Reports: destroy_reports

(Permissions ticked in the Foreman UI for that group)

That user won't be able to delete that host:

Operation FAILED: ERROR: update or delete on table "hosts" violates foreign key constraint "reports_host_id_fk" on table "reports"
DETAIL: Key (id)=(283) is still referenced from table "reports".

When the "destroy_reports" permission is added to that role, then destroying hosts works as expected.


Related issues 1 (0 open1 closed)

Has duplicate Foreman - Bug #5616: Delete of Host fails when Reports are presentDuplicate05/07/2014Actions
Actions

Also available in: Atom PDF