Skip to Content.
Sympa Menu

grouper-users - Re: [grouper-users] Using a custom attribute for subject display

Subject: Grouper Users - Open Discussion List

List archive

Re: [grouper-users] Using a custom attribute for subject display

Chronological Thread 
  • From: Peter DiCamillo <>
  • To: Chris Hyzer <>
  • Cc: "" <>
  • Subject: Re: [grouper-users] Using a custom attribute for subject display
  • Date: Tue, 07 Aug 2012 14:43:48 -0400

Yes, I updated again and copied the plugin change to my plugin. That's working well, and I no longer get errors logged from an export. Thanks!


Chris Hyzer wrote:
Can you update from the 2.1 branch and try again please? I believe I have
the export bug fixed too, you shouldn't see a stack anymore...

Also, I change my version of the plugin so that GrouperSysAdmin cant see the
string, but wheel group can...



-----Original Message-----

On Behalf Of Peter DiCamillo
Sent: Friday, August 03, 2012 4:08 PM

Subject: Re: [grouper-users] Using a custom attribute for subject display

I must have been looking at the wrong CSV file, because when I tested again, the attributes were being removed. However, I do still get the errors in the log.


On 8/3/12 3:37 PM, Peter DiCamillo wrote:
There may be a problem after all. In addition to adding an attribute,
I'm also using the filter to remove some attributes for non-privileged
users. However, the attributes are not removed when I used Export
Members for a group. Maybe there's another missing call to the subject

Export Member creates a file with all the data (too much data in this
case), but also generates a null pointer exception in the log. It
appears to be trying to display an error message, but failing. I've
attached the log data.


On 8/3/12 1:50 PM, Peter DiCamillo wrote:
Thanks for the quick fix and example code. I updated from svn, changed
the code for the attribute values I wanted, and it works great now.


On 8/3/12 1:47 AM, Chris Hyzer wrote:
Unfortunately the subject query method that the UI uses wasnt calling
the subject filter in 2.1.1. I fixed this and tested in 2.1.2
(currently in the svn branch GROUPER_2_1_BRANCH)

I used the subject customizer Java class (attached). I configured it
in the

# customize subjects by implementing this interface:
# or extending this class:
# note the instance will be reused to make sure it is threadsafe
subjects.customizer.className =

I configured the media.propeties (note that for the lite UI you need
to edit the grouper/ and not the
custom/, see GRP-829):

# for jdbc subjects in admin ui

# lite display settings
grouperUi.subjectImg.screenEl.1 =

Then I created the group (you can change this in the java source):
etc:privilegedGroup, and added some users to it.

When I logged in as those users, I saw a different display more info),
than when I logged in as users not in that group. If you can pull
Grouper and Grouper-UI from the branch, try it out. Otherwise, 2.1.2
should be out shortly :)



on behalf of Peter DiCamillo
Sent: Thursday, August 02, 2012 4:08 PM

Subject: [grouper-users] Using a custom attribute for subject display

We're upgrading to Grouper 2.1.1, and I'm trying to improve how we
display subjects in the Grouper UI. Ideally, I'd like to display either:
lastname, firstname or
lastname, firstname (internal_id)
The internal id is confidential, but very convenient for privileged
staff who are allowed to access it. Grouper would include the internal
id in subject displays when a session's subject is privileged.

I tried to do this by defining a new attribute for subjects, and
specifying it for the source's subject.display attribute in
media.properies. First I tried to add the attribute to subjects using an
override for decorateSubjects. However, I never saw decorateSubjects
being called for subject display. After that, I tried overriding
filterSubjects, and adding the attribute to the subjects' attribute
maps. That worked for search results, but didn't work for group
membership results. Finally, while still using filterSubjects, I tried
defining a virtual attribute from the added attribute, and that didn't
work at all.

Is there a way to do what I want to do, or is it to too ambitious? The
new video regarding this topic was very helpful, and gave me the idea
this might be possible. Even if it isn't, I'm impressed by what clearly
is possible now.


Archive powered by MHonArc 2.6.16.

Top of Page