Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#1575 closed defect (fixed)

Can't remove user from the role or group

Reported by: ChristineBao Owned by: Christine Bao
Priority: high Milestone: 2.3
Component: Map Admin Version: 2.2.0
Severity: critical Keywords:
Cc: Jenny He; Bruce Dechant External ID: 1374623

Description

Report from Autodesk QA:

  1. 1. go to mapadmin page (http://localhost/mapguide2012/mapadmin/)[[BR]]
  2. add user (e.g 'qa1')
  3. assign roles to the new user , ticking both Administrator role and Map Author role
  4. enter 'manage users' to make sure the role assignment is successful
  5. enter 'Assign Roles' page again, uncheck the roles for 'qa1' and save
  6. enter 'manage users' page to check the 'qa1' setting

result:
for 'qa1', it still has the roles 'Adminsitrator' and 'Author' assigned.

expecation:
'qa1' has no roles assigned.

Attachments (1)

Fix#1575.patch (2.1 KB ) - added by ChristineBao 14 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 by ChristineBao, 14 years ago

Tech assessment:

This is caused by the xQuery not correct. The role xml in side MgSiteResourceContents.dbxml is:

<?xml version="1.0" encoding="UTF-8" standalone="no"?><Role xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="Role-1.0.0.xsd">
	<Description>Administrator role</Description>
	<Users>
		<User>
			<Name>Administrator</Name>
		</User>
		<User>
			<Name>test</Name>
		</User>
	</Users>
	<Groups>
	</Groups>
</Role>

According to the xml structure, modify the xQuery string to something like:

delete nodes collection('MgSiteResourceContents.dbxml')/Role[starts-with(Description, "Administrator")]/Users/User[Name="test"]

Test in MapGuide and pass.

comment:2 by ChristineBao, 14 years ago

Attach fixing for review.

by ChristineBao, 14 years ago

Attachment: Fix#1575.patch added

comment:3 by ChristineBao, 14 years ago

Bruce found another defect about removing user from group. The patch has been updated to fix:

  1. Remove user from role.
  2. Remove user from group.
  3. Remove group from role.

comment:4 by brucedechant, 14 years ago

Summary: Can't remove user from the roleCan't remove user from the role or group

comment:5 by brucedechant, 14 years ago

Milestone: 2.22.3
Resolution: fixed
Status: newclosed
Version: 2.1.02.2.0

comment:6 by brucedechant, 14 years ago

Fixed. r5480

Note: See TracTickets for help on using tickets.