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: Chris Hyzer <>
  • To: Peter DiCamillo <>, "" <>
  • Subject: RE: [grouper-users] Using a custom attribute for subject display
  • Date: Mon, 6 Aug 2012 21:44:45 +0000
  • Accept-language: en-US

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...

Attached

Thanks,
Chris

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


[mailto:]
On Behalf Of Peter DiCamillo
Sent: Friday, August 03, 2012 4:08 PM
To:

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.

Peter

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
> filter?
>
> 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.
>
> Peter
>
> 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.
>>
>> Peter
>>
>> 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 grouper.properties:
>>>
>>> # customize subjects by implementing this interface:
>>> edu.internet2.middleware.grouper.subj.SubjectCustomizer
>>> # or extending this class:
>>> edu.internet2.middleware.grouper.subj.SubjectCustomizerBase
>>> (recommended)
>>> # note the instance will be reused to make sure it is threadsafe
>>> subjects.customizer.className =
>>> edu.internet2.middleware.grouper.subj.decoratorExamples.SubjectCustomizerForDecoratorUiDisplay
>>>
>>>
>>>
>>> I configured the media.propeties (note that for the lite UI you need
>>> to edit the grouper/media.properties and not the
>>> custom/media.properties, see GRP-829):
>>>
>>> # for jdbc subjects in admin ui
>>> subject.display.jdbc=uiLabel
>>>
>>> # lite display settings
>>> grouperUi.subjectImg.screenEl.1 =
>>> ${subject.getAttributeValue('uiLabel')}
>>>
>>> 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 :)
>>>
>>> Thanks,
>>> Chris
>>>
>>>
>>>
>>> ________________________________________
>>> From:
>>>
>>> []
>>> on behalf of Peter DiCamillo
>>> []
>>> Sent: Thursday, August 02, 2012 4:08 PM
>>> To:
>>>
>>> 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.
>>>
>>> Peter
>>>
>>>
>>>

Attachment: SubjectCustomizerForDecoratorUiDisplay.java
Description: SubjectCustomizerForDecoratorUiDisplay.java




Archive powered by MHonArc 2.6.16.

Top of Page