Skip to Content.
Sympa Menu

grouper-users - [grouper-users] minor: a way to unset memberships enabledTime & disabledTime using webservice

Subject: Grouper Users - Open Discussion List

List archive

[grouper-users] minor: a way to unset memberships enabledTime & disabledTime using webservice


Chronological Thread 
  • From: "Krenn, Martin" <>
  • To: "''" <>
  • Subject: [grouper-users] minor: a way to unset memberships enabledTime & disabledTime using webservice
  • Date: Wed, 5 Nov 2014 09:40:48 +0000
  • Accept-language: de-AT, en-GB, en-US

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


Attachment: smime.p7s
Description: S/MIME cryptographic signature




Archive powered by MHonArc 2.6.16.

Top of Page