Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter roles #2

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Conversation

puck
Copy link

@puck puck commented Jul 23, 2022

This pull request effectively adds support for loading back in the output of Bulk Download of assets. You still need to create a mapping, but this might be enough to allow an attempt at automatic mapping.

Adds support for:

  • Add multiple records to Owner (if AssetMultipleOwner enabled), HeldBy, and Contact
  • Loading of principal details included in the CSV (remove fullnames, handle Nobody)
  • Remove principals from a role if not present in the CSV
  • The use of Catalogue as a heading
  • Add group(s) to a Role
  • Skips any usernames not found - previously they default to Nobody which was mighty annoying.

puck added 6 commits July 24, 2022 00:28
This allows loading a CSV generated from the Download Spreadsheet link
from the Assets search results pages in RT. It:
 - Handles multiple principals.
 - Strips off the fullname.
 - Handles - ignores - usernames which don't exist (previously Nobody
   account was used).
This adds:
 - handling groups
 - removing users/groups which aren't in the CSV file
 - handling Owner (with AssetMultipleOwner on and off)
Strictly speaking only the first line needed to be changed, but I figure
for consistency it is clearer if we just use $principal.  ($user and
$principal are pointing to the same object for the second line.)
I noticed that RT inserts "group:$group_name" in the role fields when
creating an asset in the web interface.

However, Download Spreadsheet uses "Group: $group_name" (this is what I
initially selected to support).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant