Start a new topic

Removing ane of many groups from a user results in all group membership gone

Hi

Been poking at automating adding users to groups, setting inheritance, etc.  In doing so, I think I've found a bug - not really certain.

The issue seems to arise that if I have a user in multiple groups, then remove the user from ONE group, the UI shows that the user is still part of the OTHER groups, inheritance reflects that, but the XML does not.

Then when I do stuff through API calls, I rebuild inheritance built off group membership - so the user loses inheritance and membership in the OTHER groups.

Make sense?

So, if I have 2 users, each in one group, my groups and inheritance looks like:
<?xml version="1.0" encoding="UTF-8"?>
<groups type="properties">
  <G_FTPUser type="vector">
  <G_FTPUser_subitem>placeholder</G_FTPUser_subitem>
  <G_FTPUser_subitem>G_FTPUser</G_FTPUser_subitem>
  </G_FTPUser>
  <G_ESP-RIFTS type="vector">
  <G_ESP-RIFTS_subitem>G_ESP-RIFTS</G_ESP-RIFTS_subitem>
  <G_ESP-RIFTS_subitem>esp-apache</G_ESP-RIFTS_subitem>
  <G_ESP-RIFTS_subitem>esp-andes</G_ESP-RIFTS_subitem>
  </G_ESP-RIFTS>
</groups>

<?xml version="1.0" encoding="UTF-8"?>
<inheritance type="properties">
  <esp-apache type="vector">
  <esp-apache_subitem>G_ESP-RIFTS</esp-apache_subitem>
  </esp-apache>
  <esp-andes type="vector">
  <esp-andes_subitem>G_ESP-RIFTS</esp-andes_subitem>
  </esp-andes>
</inheritance>

 


Next, I add "esp-andes" to "G_FTPUser".  The UI shows an "*" by each group that "esp-andes" is a part of.  The XML:
<?xml version="1.0" encoding="UTF-8"?>
<groups type="properties">
  <G_FTPUser type="vector">
  <G_FTPUser_subitem>placeholder</G_FTPUser_subitem>
  <G_FTPUser_subitem>G_FTPUser</G_FTPUser_subitem>
  <G_FTPUser_subitem>esp-andes</G_FTPUser_subitem>
  </G_FTPUser>
  <G_ESP-RIFTS type="vector">
  <G_ESP-RIFTS_subitem>G_ESP-RIFTS</G_ESP-RIFTS_subitem>
  <G_ESP-RIFTS_subitem>esp-apache</G_ESP-RIFTS_subitem>
  <G_ESP-RIFTS_subitem>esp-andes</G_ESP-RIFTS_subitem>
  </G_ESP-RIFTS>
</groups>

<?xml version="1.0" encoding="UTF-8"?>
<inheritance type="properties">
  <esp-apache type="vector">
  <esp-apache_subitem>G_ESP-RIFTS</esp-apache_subitem>
  </esp-apache>
  <esp-andes type="vector">
  <esp-andes_subitem>G_ESP-RIFTS</esp-andes_subitem>
  <esp-andes_subitem>G_FTPUser</esp-andes_subitem>
  </esp-andes>
</inheritance>

 


So far so good - "esp-apache" is fine, in the ESP-RIFTS group, and inheriting that one user.  "esp-andes" is also in the G_FTPUser group, and the ESP-RIFTS group.  Also showing correct inheritance.

Now, in the UI, I will select the "G_FTPUser" group

Right-click on "esp-andes", select Groups, select Remove Selected Users From Groups

Confirmation reads that I'm going to remove "esp-andes" from the G_FTPUser group.  Click OK

The UI, still in the Group view, shows no members (other than the G_FTPUser where settings are defined).

Switching the group view to "All Users", and selecting "esp-andes", the Group dropdown now does NOT show any "*".  The inheritance shows "G_ESP-RIFTS".

The XML reflects the same, that "esp-andes" is not part of of the "G_ESP-RIFTS" group, but is still inheriting.
<?xml version="1.0" encoding="UTF-8"?>
<groups type="properties">
  <G_FTPUser type="vector">
  <G_FTPUser_subitem>placeholder</G_FTPUser_subitem>
  <G_FTPUser_subitem>G_FTPUser</G_FTPUser_subitem>
  </G_FTPUser>
  <G_ESP-RIFTS type="vector">
  <G_ESP-RIFTS_subitem>G_ESP-RIFTS</G_ESP-RIFTS_subitem>
  <G_ESP-RIFTS_subitem>esp-apache</G_ESP-RIFTS_subitem>
  </G_ESP-RIFTS>
</groups>

<?xml version="1.0" encoding="UTF-8"?>
<inheritance type="properties">
  <esp-apache type="vector">
  <esp-apache_subitem>G_ESP-RIFTS</esp-apache_subitem>
  </esp-apache>
  <esp-andes type="vector">
  <esp-andes_subitem>G_ESP-RIFTS</esp-andes_subitem>
  </esp-andes>
</inheritance>

 


The issue that this presents me is that during addition of users, I am adding users to various groups.  When this happens, I can retrieve group membership information (getUserXML, group), and create the inheritance information from that - except the group information is incorrect.

Is this a bug, or am I doing it wrong?

Thanks,

Tim

P.S.  Sorry for the verbosity!

What exact version of CrushFTP is this?

Version 7.7.0 Build : 27

 

Start by updating to the latest 7.7. build.  I know we had an API bug in this area a few months ago.


Let me know.

Will do, thanks.  I assume the issue is fixed in version 8 as well?

I didn't realise V8 came out until I came to post this..  we're not at the point of turning things live, so plans are underway to upgrade anyways.

 

Yes, v8 has fixes too.  v8 also has the ability to add a user to a group, or inheritance where v7 required the download of the list, then a replacement of the entire list (inheritance / group).  So v8 makes using the API easier to do so.

Ahh, of course, now that I spent all that time figuring that part of the API out :)

Thanks.  Appreciate the quick response here.  V8 doesn't seem to break anything in terms of my migration tool, so the impact was really small.

 

In V8.0.4 Build 3, the issue still persists.  The groups.XML contains a duplicate entry, but no "esp-andes".  Inheritance.xml shows "esp-andes" inheriting G_ESP-RIFTS (which is correct).

Sorry or the delay.  Can you email us at our support emails and reference this forum?  It will be best if we can do a GoToMeeting and figure out why this is failing.


I forgot about this pending forum for a few days.  Our support email won't have that issue.


Thanks,

Ben

Login to post a comment