Bug 1542556 - The last Spacewalk admin can be deleted if it's not an org admin and is disabled
Summary: The last Spacewalk admin can be deleted if it's not an org admin and is disabled
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Spacewalk
Classification: Community
Component: Server
Version: 2.7
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Tomáš Kašpárek
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: space28
TreeView+ depends on / blocked
 
Reported: 2018-02-06 14:58 UTC by Laurence Rochfort
Modified: 2018-04-20 12:31 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-20 12:31:06 UTC
Embargoed:


Attachments (Terms of Use)

Description Laurence Rochfort 2018-02-06 14:58:44 UTC
Description of problem:
If the last Spacewalk admin has the organization admin role removed, and is then deactivated, it can then be deleted by an organization administrator in the same org.

This leaves Spacewalk with no admin accounts. It is then not possible to create a new Spacewalk admin account or grant the Spacewalk admin role to another user.

Version-Release number of selected component (if applicable):
All

How reproducible:
Web UI, spacecmd and xmlrpc

Steps to Reproduce:
Example from web UI:

Assume two users, sw_admin and org_admin, both in org1. 

sw_admin is both a Spacewalk admin and an org_admin for org1. 
org_admin is only an org admin for org1.

1. Login as org_admin
2. Remove Organization Administrator role from sw_admin
3. Deactivate sw_admin user
4. Delete sw_admin user

Actual results:
Last admin user is deleted.

Expected results:
Should be told it's not permissable to delete the last Spacewalk admin. This is the current behaviour if the account was active.

Comment 1 Jiří Dostál 2018-03-23 14:53:14 UTC
Resolved by https://github.com/spacewalkproject/spacewalk/pull/627
spacewalk.git
0b816e010a686a08504cc568c7a6be011d4ebe3f

Comment 2 Jiří Dostál 2018-03-26 12:16:26 UTC
Moving ON_QA

Comment 3 Jiří Dostál 2018-04-20 12:31:06 UTC
Spacewalk 2.8 has been released.
https://github.com/spacewalkproject/spacewalk/wiki/ReleaseNotes28


Note You need to log in before you can comment on or make changes to this bug.