Skip to Content.
Sympa Menu

grouper-users - [grouper-users] RE: Group custom attributes via GSH and SQL views

Subject: Grouper Users - Open Discussion List

List archive

[grouper-users] RE: Group custom attributes via GSH and SQL views


Chronological Thread 
  • From: "Hyzer, Chris" <>
  • To: Carl Waldbieser <>, grouper-users <>
  • Subject: [grouper-users] RE: Group custom attributes via GSH and SQL views
  • Date: Thu, 20 Sep 2018 17:04:11 +0000
  • Accept-language: en-US
  • Authentication-results: spf=none (sender IP is ) ;
  • Ironport-phdr: 9a23:yiysIh3Zk/mfWXQ/smDT+DRfVm0co7zxezQtwd8ZsesWK/3xwZ3uMQTl6Ol3ixeRBMOHs60C07KempujcFRI2YyGvnEGfc4EfD4+ouJSoTYdBtWYA1bwNv/gYn9yNs1DUFh44yPzahANS47xaFLIv3K98yMZFAnhOgppPOT1HZPZg9iq2+yo9JDffwdFiCChbb9uMR67sRjfus4KjIV4N60/0AHJonxGe+RXwWNnO1eelAvi68mz4ZBu7T1et+ou+MBcX6r6eb84TaFDAzQ9L281/szrugLdQgaJ+3ART38ZkhtMAwjC8RH6QpL8uTb0u+ZhxCWXO9D9QKsqUjq+8ahkVB7oiD8GNzEn9mHXltdwh79frB64uhBz35LYbISTOfFjfK3SYMkaSHJBUMhPSiJBHo2yYYgBD+UDPOZXs4bzqFQVoBuiHgagGP/jxiNUinL026AxzuQvERvB3AwlB98CvnbardX0NagMS+C51LTDwCvDb/NM2Df984bEeQ0mrPGJQb1wccrQyEgxGAPflViQqJflMC+P2uQQq2iU8exgVeS1h2E5tg5xvyGiy8ExgYfHgYIVz0rL9SR/wIstPt24VFR7Yd+iEJtfrS2aLJF5Qt08TGxupS00yaUGtIalcCQWypkr3RHSZv2df4SV4x/uWvydLSpliH9nYL6zmhi//VS6xuD4S8W4ykhGojdBn9XWq3wA1R3e5tCJSvRj/UqtxTOC2gXN5e1YI007jq/WJpoiz74+kpcetEXOEy/ylUnoiaKWeEEp9faz5Onhf77ovIWTN5VuhQH7KqkumtKwAeA/MgUWR2aW5eOy2KH+8UHgXbtEluA6nrDesJ/BO8sXvKm5AxJJ0ok47Ba/EjGm38kCkXkfNlJFfw6HgJb1NFHSIfD4CvG/j06rkDd22/DGOrrhApLOLnTZjLjherN951ZdyAo1099f+4pZBq8dLP/xQEP8u93VAgUkPwG1zevrEshx2p4cVG6XB6+WKqLSsVuG5uI1JOmMYZcYuDPhJPgl5//vjGE2mUUGcKmoxpsYdGq0Hul+I0qHZ3rshM0NHnkXsQojVODqkkGNUSZPZ3auWKIx/j47CJihDYfeXoCinqaB0D6mHp1NeG9GEEuMHGzsd4WFQPcMdDmSLtF7njwFU7ihV5Eu1QuotADk17prMPDY9TMFupL+h5BJ4Lj4nAs2vQN9C8iX0myWQns8ynwBQzM83a10iUh0xF6S3LRkjrpVGcEFo7tGSAAnLZPGivFhBsrpElbOZNCUUFu8B8i9DCsqZtM339IUZUthQZOvgg2VjASwBLpA3ZyaFpEutur332LwPIw1n3PN1LgzgkMOQ9BEc3C+i6h5sQXfGtiawA2ii6+2ePFEj2b2/2CZwD/L5RkAClQiWLjZXX0ZekrdpMj44UWHVbK1FLA7KVUdm9WaJP5MbdvkxRVdSfHvNc6WQlr5mnz4RHPqjqiJcJKsfmwc2CvHD01RlgsT7GSLLyA/HSznvnrTCjooGF7yMAvh
  • Spamdiagnosticmetadata: NSPM
  • Spamdiagnosticoutput: 1:99

gsh 0% GrouperSession grouperSession = GrouperSession.startRootSession();
gsh 1% AttributeDef attributeDef = new
AttributeDefSave(grouperSession).assignName("test:testAttribute:someAttrDef").assignCreateParentStemsIfNotExist(true).assignToGroup(true).assignAttributeDefType(AttributeDefType.attr).assignMultiAssignable(false).assignMultiValued(false).assignValueType(AttributeDefValueType.string).save();
gsh 2% AttributeDefName attributeDefName = new
AttributeDefNameSave(grouperSession,
attributeDef).assignName("test:testAttribute:someAttr").assignCreateParentStemsIfNotExist(true).save();
gsh 3% Group group = new
GroupSave(grouperSession).assignName("test:testAttribute:group").assignCreateParentStemsIfNotExist(true).save()
gsh 4%
group.getAttributeValueDelegate().assignValueString(attributeDefName.getName(),
"someValue");
edu.internet2.middleware.grouper.attr.value.AttributeValueResult:
edu.internet2.middleware.grouper.attr.value.AttributeValueResult@2f08e6d3
gsh 5%

SELECT value_string FROM grouper_aval_asn_group_v WHERE group_name =
'test:testAttribute:group' AND attribute_def_name_name =
'test:testAttribute:someAttr'

returns someValue

-----Original Message-----
From:


<>
On Behalf Of Carl Waldbieser
Sent: Thursday, September 20, 2018 12:26 PM
To: grouper-users
<>
Subject: [grouper-users] Group custom attributes via GSH and SQL views


I'd like to create a custom attribute that would be used on several groups.
I'd like the attribute to be able to hold one of several distinct enumerated
values, though I suppose I could use a plain text value. I'd like to be able
to set the attribute and value on particular groups via a GSH script, and I'd
like to be able to read the attribute via SQL using the Grouper view tables.

Any pointers on how to configure something like this? GSH examples for
setting an attribute and value on a group? And what SQL views hold the
group-attribute-value?

Thanks,
Carl Waldbieser
ITS Identity Management
Lafayette College



Archive powered by MHonArc 2.6.19.

Top of Page