grouper-users - [grouper-users] RE: minor: a way to unset memberships enabledTime & disabledTime using webservice
Subject: Grouper Users - Open Discussion List
List archive
[grouper-users] RE: minor: a way to unset memberships enabledTime & disabledTime using webservice
Chronological Thread
- From: Chris Hyzer <>
- To: "Krenn, Martin" <>, "''" <>
- Subject: [grouper-users] RE: minor: a way to unset memberships enabledTime & disabledTime using webservice
- Date: Wed, 5 Nov 2014 14:41:06 +0000
- Accept-language: en-US
Good catch. Would be easiest to pick some input for those that means clear
it out. Otherwise we need to add a couple more params which is kind of a
pain for the WSDL etc (try not to do that on point releases)...
https://bugs.internet2.edu/jira/browse/GRP-1071
maybe just put the string "null" in there? :) what do you think?
Note: we have the same problem in other areas, e.g. blanking out a
description of a group...
Does
-----Original Message-----
From:
[mailto:]
On Behalf Of Krenn, Martin
Sent: Wednesday, November 05, 2014 4:41 AM
To:
''
Subject: [grouper-users] minor: a way to unset memberships enabledTime &
disabledTime using webservice
Hi all,
I think it's impossible to unset enabled- / diabaledTimes of a membership
with webservices.
I can see that the implementation saves a membership query. On the other
hand I don't like the workarounds I can think of.
lg martin
Method:
GrouperServiceLogic. WsAddMemberResults
Relevant code:
final boolean dealWithDates = enabledTime != null || disabledTime != null;
if (dealWithDates) {
//get the membership
Membership membership = group.getImmediateMembership(FIELD_CALCULATED,
subject, true, true);
boolean needsUpdate = false;
if (!GrouperUtil.equals(disabledTime, membership.getDisabledTime())) {
membership.setDisabledTime(disabledTime);
needsUpdate = true;
}
if (!GrouperUtil.equals(enabledTime, membership.getEnabledTime())) {
membership.setEnabledTime(enabledTime);
needsUpdate = true;
}
if (needsUpdate) {
membership.update();
}
}
--
Martin Krenn
University of Innsbruck
Central IT Services
A-6020 Innsbruck
email:
phone: ++43 (0) 512-507-23329
fax: ++43 (0) 512-507-23901
- [grouper-users] minor: a way to unset memberships enabledTime & disabledTime using webservice, Krenn, Martin, 11/05/2014
- [grouper-users] RE: minor: a way to unset memberships enabledTime & disabledTime using webservice, Chris Hyzer, 11/05/2014
Archive powered by MHonArc 2.6.16.