Skip to content

Commit

Permalink
SAK-26565 Develop new API to help with the integration of SignUp tool…
Browse files Browse the repository at this point in the history
… and additional calendar (Google)

git-svn-id: https://source.sakaiproject.org/svn/calendar/trunk@310469 66ffb92e-73f9-0310-93c1-f5514f145a0a
  • Loading branch information
reggiejr committed Jun 27, 2014
1 parent 2045118 commit 8296fdd
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,14 @@ public CalendarEventEdit mergeEvent(Element el)
* @return The Collection (Group) of groups defined for the context of this channel that the end user has remove event permissions in, empty if none.
*/
Collection getGroupsAllowRemoveEvent( boolean own );

/**
* Checks if user has permission to modify any event (or fields) in this calendar
* @param function
* @return
*/
public boolean canModifyAnyEvent(String function);


} // Calendar

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import net.fortuna.ical4j.model.component.VEvent;
import net.fortuna.ical4j.model.parameter.Value;
import net.fortuna.ical4j.model.property.*;

import org.apache.avalon.framework.logger.ConsoleLogger;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log;
Expand Down Expand Up @@ -88,6 +89,7 @@
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.sax.SAXResult;
import javax.xml.transform.stream.StreamSource;

import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
Expand Down Expand Up @@ -3475,6 +3477,16 @@ public void startElement(String uri, String localName, String qName, Attributes
};
}

/**
* Checks if user has permission to modify any event (or fields) in this calendar
* @param function
* @return
*/
@Override
public boolean canModifyAnyEvent(String function) {
return AUTH_MODIFY_CALENDAR_ANY.equals(function);
}

} // class BaseCalendar


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1113,6 +1113,16 @@ protected List<CalendarEvent> filterEvents(List<CalendarEvent> events,
return filtered;

}

/**
* Checks if user has permission to modify any event (or fields) in this calendar
* @param function
* @return
*/
@Override
public boolean canModifyAnyEvent(String function){
return CalendarService.AUTH_MODIFY_CALENDAR_ANY.equals(function);
}
}

public class ExternalCalendarEvent implements CalendarEvent
Expand Down

0 comments on commit 8296fdd

Please sign in to comment.